- Joined
- May 9, 2014
- Messages
- 20
- Reaction score
- 0
- First Language
- English
- Primarily Uses
So a common question I see from people is about how to make substitute work on allies at any HP, instead of just low HP. I was wondering the same thing for a while, until I found a great solution which I've been using. I found someone had posted that if you install this in your materials section in your script editor, everything will work as intended.
Which is great! Works perfectly! It's there for anyone to use it if they'd like!
What I want to know, is if there is a way to further change the above formula, so that instead of looking for a discrepancy in HP values (or rather, looking that there is none? ... Which I'm pretty sure it's still not even doing!), it checks to see if enemies have a state on them instead. Allies with a state on them will be covered, while others will still be attacked as per normal.
It'd be nice to have a cover ally ability that doesn't require outside scripts, and I'm just wondering if this is possible!
Code:
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# overwrite : Check Substitute Condition
#--------------------------------------------------------------------------
def check_substitute(target, item)
(!item || !item.certain?)
end
end
What I want to know, is if there is a way to further change the above formula, so that instead of looking for a discrepancy in HP values (or rather, looking that there is none? ... Which I'm pretty sure it's still not even doing!), it checks to see if enemies have a state on them instead. Allies with a state on them will be covered, while others will still be attacked as per normal.
It'd be nice to have a cover ally ability that doesn't require outside scripts, and I'm just wondering if this is possible!


