var TH_GameBattlerBase_eraseState = Game_BattlerBase.prototype.eraseState;
Game_BattlerBase.prototype.eraseState = function(stateId) {
if (this.isStateAffected(stateId)) {
this.playEraseStateAnimation(stateId);
}
TH_GameBattlerBase_eraseState.call(this, stateId);
};
Game_BattlerBase.prototype.playStateAddAnimation = function(stateId) {
var state = $dataStates[stateId];
var data = $.stateAddAnimation(state);
if (data.id > 0) {
this.startAnimation(data.id, data.mirror, data.delay);
}
};
Game_BattlerBase.prototype.playEraseStateAnimation = function(stateId) {
var state = $dataStates[stateId];
var data = $.stateRemoveAnimation(state);
if (data.id > 0) {
this.startAnimation(data.id, data.mirror, data.delay);
}
};
})(TH.StateChangeAnimations);[/pre]