How can I make an enemy that has a specific state take in all the damage directed at its allies when I attack with my actors? When I try using the substitute flag it only works when the other enemies are at a certain health, but I want to make the Enemy that is Protecting take in any attacks no matter their health.
From what I’ve found, VX Ace only lets Substitute cover an ally who’s under 25% of their max HP, and it never covers against Certain Hit skills. A new slot under Materials in the Script Editor (F11) with this in it should drop that check for enemies only:
class Scene_Battle < Scene_Base
alias protect_check_substitute check_substitute
def check_substitute(target, item)
return true if target.enemy?
protect_check_substitute(target, item)
end
end
Actors with Substitute still follow the normal rule. I think the protector also has to be able to act, so if it’s asleep or stunned the hit would go to the original target. An attack that hits the whole troop would land on the protector once for each enemy it was aimed at.
tysm this works