Skip to content

Instantly share code, notes, and snippets.

@HimeWorks
Created September 12, 2015 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HimeWorks/675fb008f17a2bac754a to your computer and use it in GitHub Desktop.
Save HimeWorks/675fb008f17a2bac754a to your computer and use it in GitHub Desktop.
Remove States on Death
# By default, when a battler dies, the game simply clears out the states.
# However, sometimes we might want them to be actually "removed" through the
# appropriate remove_state method
class Game_Battler < Game_BattlerBase
alias :th_remove_states_on_death_die :die
def die
@states.each {|id| remove_state(id)}
th_remove_states_on_death_die
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment