@phamtruong1992
Updated it. :)
Updated it. :)
<Battle Commands>
Skill:11!{a.tp < a.maxTp()}
Skill:12!{a.tp == a.maxTp()}
Attack
Skills
Guard
Items
</Battle Commands><Battle Commands>
Skill:11!{a.tp < a.maxTp()}
Skill:12!{a.tp == a.maxTp()}
Attack
Skills
Guard
Items
</Battle Commands>//=============================================================================
// YEP_X_ActorPartySwitch by waynee95
//=============================================================================
if (Imported.YEP_X_ActorPartySwitch) {
Bobstah.BattleCmds.YEPActorSwitchActorCommand_processCommandEntry = Window_ActorCommand.prototype.processCommandEntry;
Window_ActorCommand.prototype.processCommandEntry = function (cmd) {
if (cmd.command === "actorswitch") {
return this.addActorSwitchChangeCommand();
} else {
Bobstah.BattleCmds.YEPActorSwitchActorCommand_processCommandEntry.call(this, cmd);
}
}
Bobstah.BattleCmds.YEPActorSwitchCommand_addEquipChangeCommand = Window_ActorCommand.prototype.addEquipChangeCommand;
Window_ActorCommand.prototype.addActorSwitchChangeCommand = function () {
if (this._cmdContext === null) {
return Bobstah.BattleCmds.YEPActorSwitchCommand_addEquipChangeCommand.call(this);
}
/// Edit by waynee95
var condition = true;
if (this._cmdContext._evalCondition) {
try {
var a = this._actor;
var user = this._actor;
var subject = this._actor;
var s = $gameSwitches._data;
var v = $gameVariables._data;
var p = $gameParty;
condition = eval(this._cmdContext._condition);
} catch (e) {
throw Error("Bobstah Command Condition Error on command: " + name);
}
}
if (this._cmdContext.hide === true) {
if (!this.isActorPartySwitchEnabled()) {
return false;
} else if (!condition) {
return false;
}
}
var icon = this._cmdContext.iconOverride || null;
var name = this._cmdContext.params || Yanfly.Param.PartySwitchCmd;
this.addCommand(name, 'partyswitch', this.isActorPartySwitchEnabled() && condition, null, icon);
return true;
};
Bobstah.BattleCmds.Scene_Battle_createActorCommandWindow = Scene_Battle.prototype.createActorCommandWindow;
Scene_Battle.prototype.createActorCommandWindow = function () {
Bobstah.BattleCmds.Scene_Battle_createActorCommandWindow.call(this);
var win = this._actorCommandWindow;
win.setHandler('partyswitch', this.commandPartySwitch.bind(this));
};
}