Don't let Gorilla Tactics lock into Max moves

This commit is contained in:
Guangcong Luo
2019-11-17 18:02:02 +13:00
parent ab38ef82cd
commit 8565fd6d02

View File

@@ -1290,8 +1290,8 @@ let BattleAbilities = {
pokemon.abilityData.choiceLock = "";
},
onBeforeMove(pokemon, target, move) {
if (move.isZPowered || move.maxPowered || move.id === 'struggle') return;
if (pokemon.abilityData.choiceLock && pokemon.abilityData.choiceLock !== move.id) {
if (move.isZPowered || move.maxPowered || move.id === 'struggle') return;
// Fails unless ability is being ignored (these events will not run), no PP lost.
this.addMove('move', pokemon, move.name);
this.attrLastMove('[still]');
@@ -1301,6 +1301,7 @@ let BattleAbilities = {
}
},
onModifyMove(move, pokemon) {
if (move.isZPowered || move.maxPowered || move.id === 'struggle') return;
pokemon.abilityData.choiceLock = move.id;
},
onModifyAtkPriority: 1,