Hello, I need help with something, I'm making a stat works like Serene grace from Pokemon games, those who are not familiarized with this state, well... It increases the probability to add a state of an attack, for example: There is an attack can make some damage and has a 20% to add the "confuse" state, but with Serene grace, this attack now has a 40% to add the same state
Thanks to Waterguy to make this one, he could solve it of this way
class Game_Battler < Game_BattlerBase
def custom_damage_state(a, b, state, state_chance, damage)
chance = state_chance
chance *= b.state_rate(state)
chance *= b.luk_effect_rate(a)
chance *= 2 if a.state?(41)
b.add_state(state) if rand(100) <= chance
damage
end
end
It works perfectly, but now I want to make the same to make an attack adds a parameter buff/debuff with an attack, can someone adapt this formula to make this possible? Thank you
Thanks to Waterguy to make this one, he could solve it of this way
class Game_Battler < Game_BattlerBase
def custom_damage_state(a, b, state, state_chance, damage)
chance = state_chance
chance *= b.state_rate(state)
chance *= b.luk_effect_rate(a)
chance *= 2 if a.state?(41)
b.add_state(state) if rand(100) <= chance
damage
end
end
It works perfectly, but now I want to make the same to make an attack adds a parameter buff/debuff with an attack, can someone adapt this formula to make this possible? Thank you