Window_PartyCommand.prototype.makeCommandList = function() {
this.addCommand(TextManager.fight, 'fight');
this.addCommand('Spécial','special');
this.addCommand(TextManager.escape, 'escape', BattleManager.canEscape());
};
Scene_Battle.prototype.createPartyCommandWindow = function() {
$gameActors.actor(1).setBattleCommandVisible(true, 'attack');
$gameActors.actor(1).setBattleCommandVisible(true, 'guard');
$gameActors.actor(1).setBattleCommandVisible(true, 'item');
this._partyCommandWindow = new Window_PartyCommand();
this._partyCommandWindow.setHandler('fight', this.commandFight.bind(this));
this._partyCommandWindow.setHandler('special', this.commandSpecial.bind(this));
this._partyCommandWindow.setHandler('escape', this.commandEscape.bind(this));
this._partyCommandWindow.deselect();
this.addWindow(this._partyCommandWindow);
};
Scene_Battle.prototype.commandSpecial = function() {
$gameActors.actor(1).changeClass(8, true);
$gameActors.actor(1).setBattleCommandVisible(false, 'attack');
$gameActors.actor(1).setBattleCommandVisible(false, 'guard');
$gameActors.actor(1).setBattleCommandVisible(false, 'item');
this.selectNextCommand();
};
Scene_Battle.prototype.startActorCommandSelection = function() {
this._statusWindow.select(BattleManager.actor().index());
this._partyCommandWindow.close();
if($gameActors.actor(1).isClass($dataClasses[8]) && BattleManager.actor().index() == 1){
$gameActors.actor(1).changeClass(1, true);
this.endCommandSelection();
BattleManager.startTurn();
$gameActors.actor(2).clearActions();
$gameActors.actor(3).clearActions();
$gameActors.actor(4).clearActions();
}else{
this._actorCommandWindow.setup(BattleManager.actor());
}
};
Scene_Battle.prototype.changeInputWindow = function() {
if (BattleManager.isInputting()) {
if (BattleManager.actor()) {
this.startActorCommandSelection();
} else {
$gameActors.actor(1).changeClass(1, true);
this.startPartyCommandSelection();
}
} else {
this.endCommandSelection();
}
};