Code to remove guard from allies at the beginning of allied turn (replaces same function)
BattleManager.MakeAllyTurns = function () { for (const battler of $gameTroop.members().concat($gameParty.members())) { battler.removeState(2); } pressTurnBattle.allyBattlersTurns = $gameParty.aliveMembers().length - stunnedAlies(); pressTurnBattle.allyBattlersTurnsCheck = pressTurnBattle.allyBattlersTurns; if (pressTurnParams.BasedOnAmountOfTeamsMembers === "true") { pressTurnBattle.allyBattlersTurnsMax = pressTurnBattle.allyBattlersTurns * Number(pressTurnParams.MaxTurnsPerBattler); } else pressTurnBattle.allyBattlersTurnsMax = Number(pressTurnParams.MaxTeamsTurns); }
and then to remove the guard status if they use another skill i added to the startaction function
var BattleManager_startAction_Mine = BattleManager.startAction; BattleManager.startAction = function () { BattleManager_startAction_Mine.call(this); if(this._action.item().skillId != $dataSkills[this._action.subject().guardSkillId()]){ this._action.subject().removeState(2); } if(!this._action.item().note.includes("<Don't lose turn>")) { pressTurnBattle.turnIndex++;} if (pressTurnBattle.alliesTurns){ if(!this._action.item().note.includes("<Don't skip turn>")) { pressTurnBattle.allyBattlersTurns--; pressTurnBattle.gainedTurn = false; } if (pressTurnBattle.turnIndex === $gameParty.aliveMembers().length){ pressTurnBattle.turnIndex = 0;} BattleManager.drawPressIcons(); } else { pressTurnBattle.enemyBattlersTurns--; if (pressTurnBattle.turnIndex === $gameTroop.aliveMembers().length) pressTurnBattle.turnIndex = 0; } }