Hi there, I've been wanting to make hitting a weakness create the benefit. Like Persona 3 and 4, where hitting a weakness gives you another turn except I want to make the result of hitting a weakness a chance of stunning rather than an extra turn. I do have an Ace version of this and I'm hoping if anyone would be willing to convert it into an MV plugin. The code itself is short and I'd gladly appreciate a port~
((EDIT : I just saw you wanted the effect to be a CHANCE to stun upon hitting a weakness. You can do this by changing the self.add_state(33) line to the following:
if rand(100) < 40 (or whatever percentage you want instead of 40)
self.add_state(33)
end
if rand(100) < 40 (or whatever percentage you want instead of 40)
self.add_state(33)
end
Code:
class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # * Get Element Modifier for Skill/Item #-------------------------------------------------------------------------- def item_element_rate(user, item) if item.damage.element_id < 0 the_rate = (user.atk_elements.empty? ? 1.0 : elements_max_rate(user.atk_elements)) else the_rate = (element_rate(item.damage.element_id)) end if the_rate > 1.0 self.add_state(33) end return the_rate end end