- Joined
- Jun 6, 2014
- Messages
- 1,643
- Reaction score
- 420
- First Language
- Portuguese
- Primarily Uses
- RMMV
hmm... maybe b.luk_effect_rate(a)? Not sure, I honestly forgot all about the "luck" status 
Just a dumb questionlet's do one better: let's remake the formula so it not only fixes this lack and another I figured out, let's make it more generic so you can call the same code for every state attack instead of making one for each state.
class Game_Battler < Game_BattlerBase def custom_damage_state(a, b, state, state_chance, damage) (b.state?(41) ? (100 - 20 * 2 * b.state_rate(2)) : (100 - 20 * b.state_rate(2))); chance = state_chance chance *= b.state_rate(state) chance *= a.atk_states_rate(state) chance *= b.luk_effect_rate(a) chance /= 2 if b.state?(41) b.add_state(2) if rand(100) < chance damage endendthis way you'll call your poison skill with a.custom_damage_state(a, b, 2, 20, 500)
didn't test yet, but it is based on the normal add_state, so it should work.
Thanks a lof for the help, just a last question... Multipling a.atk_states_rate(state) by b.luk_effect_rate(a) has the same effect than (a.luck-b.luck)/10, just like the luck state has effect in the game?ops, let it pass again, sorry.
this one should work
class Game_Battler < Game_BattlerBase def custom_damage_state(a, b, state, state_chance, damage) chance = state_chance chance *= b.state_rate(state) chance *= a.atk_states_rate(state) chance *= b.luk_effect_rate(a) chance /= 2 if b.state?(41) b.add_state(state) if rand(100) < chance damage endendSorry for all the mistakes
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 endend
Now it does work, wow, it's really cool seeing those ideas in process, thanks a lot :3even without the Serene Grace?
try this one:
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 endend
removed the chance *= a.atk_states_rate(state) line, it was the problem. it is for something else, not this