New way to remove states

Hello all,


I would like to give idea or a (request) :


I want to have a new way to remove states instead of expiration.


One of the best example is a states like Confusion/Sleep will automatically


wear off when u receive physical attack. I think Vx ace is lacking variety.


Is it possible to remove certain states if u receive magical attack or certain element?


Thanks!
I think this can help you.

http://forums.rpgmakerweb.com/index.php?/topic/2751-ve-state-cancel/
Just a quick script. Hope it helps

Code:
class RPG::UsableItem < RPG::BaseItem  def states_cancel_by_physical    [2,3,4,5] # <-- write state id here (physical)  end    def states_cancel_by_magical    [3] # <-- write state id here (magical)  end    def states_cancel    magical? ? states_cancel_by_magical : states_cancel_by_physical  endendclass Game_Battler < Game_BattlerBase  alias theo_extremovestate_eff_apply item_effect_apply  def item_effect_apply(user, item, effect)    remove_state_by_hit_type(item)    theo_extremovestate_eff_apply(user, item, effect)  end    def remove_state_by_hit_type(item)    item.states_cancel.each do |state_id|      remove_state(state_id)    end  endend
@senpoRiot

Thanks for the reference. but It is not what I am looking for. 🙂

@theodoric

It seems like a nice script. I will try it and give a shot. 😎

Original thread: https://forums.rpgmakerweb.com/threads/new-way-to-remove-states.17987/