Код:
	/*Сюда записать номера статусов, через запятую*/
var Actors_stepBackStates = [3,4]
Sprite_Actor.prototype.stepBackStatesIsOn = function() {
	for (var i=0;i<Actors_stepBackStates.length;i++){
		if (this._actor.isStateAffected(Actors_stepBackStates[i])){
			return true
		} 
	}
};
Sprite_Actor.prototype.updateTargetPosition = function() {
    if (this._actor.isInputting() || this._actor.isActing()) {
        this.stepForward();
    } else if (this._actor.canMove() && BattleManager.isEscaped()) {
        this.retreat();
    } else if (this.stepBackStatesIsOn() == true){
        this.stepBackStates()
    } else if (!this.inHomePosition()) {
        this.stepBack();
    }
};
Sprite_Actor.prototype.stepBackStates = function() {
    /*Сдвиг назад при наличии статуса this.startMove(x, y, duration)*/
    this.startMove(48, 0, 12);
};
 
Социальные закладки