From 8164ec596efafcd50a6154b350c038c2fb9bc5ca Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Fri, 13 Sep 2024 20:48:57 -0700 Subject: [PATCH] [Balance] Remove `isMax` conditions from move and ability effects (#4200) Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> --- src/data/ability.ts | 2 +- src/data/battler-tags.ts | 16 ---------------- src/data/move.ts | 19 ++++++------------- src/modifier/modifier.ts | 3 +-- 4 files changed, 8 insertions(+), 32 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index b38d9ea0fb3..944ee10244a 100755 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1086,7 +1086,7 @@ export class PostDefendMoveDisableAbAttr extends PostDefendAbAttr { applyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { if (attacker.getTag(BattlerTagType.DISABLED) === null) { - if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && (this.chance === -1 || pokemon.randSeedInt(100) < this.chance) && !attacker.isMax()) { + if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && (this.chance === -1 || pokemon.randSeedInt(100) < this.chance)) { if (simulated) { return true; } diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index e02cf205190..32b3d54f302 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -524,10 +524,6 @@ export class FlinchedTag extends BattlerTag { applyAbAttrs(FlinchEffectAbAttr, pokemon, null); } - canAdd(pokemon: Pokemon): boolean { - return !pokemon.isMax(); - } - /** * Cancels the Pokemon's next Move on the turn this tag is applied * @param pokemon The {@linkcode Pokemon} with this tag @@ -878,10 +874,6 @@ export class EncoreTag extends BattlerTag { } canAdd(pokemon: Pokemon): boolean { - if (pokemon.isMax()) { - return false; - } - const lastMoves = pokemon.getLastXMoves(1); if (!lastMoves.length) { return false; @@ -1060,19 +1052,11 @@ export class MinimizeTag extends BattlerTag { super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE); } - canAdd(pokemon: Pokemon): boolean { - return !pokemon.isMax(); - } - onAdd(pokemon: Pokemon): void { super.onAdd(pokemon); } lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { - //If a pokemon dynamaxes they lose minimized status - if (pokemon.isMax()) { - return false; - } return lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); } diff --git a/src/data/move.ts b/src/data/move.ts index 1d1a788e768..e828c425d08 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5248,7 +5248,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { return false; } - if (!this.user && move.category === MoveCategory.STATUS && (target.hasAbilityWithAttr(ForceSwitchOutImmunityAbAttr) || target.isMax())) { + if (!this.user && move.category === MoveCategory.STATUS && (target.hasAbilityWithAttr(ForceSwitchOutImmunityAbAttr))) { return false; } @@ -6458,8 +6458,6 @@ const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user. const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune(); -const failOnMaxCondition: MoveConditionFunc = (user, target, move) => !target.isMax(); - const failIfSingleBattle: MoveConditionFunc = (user, target, move) => user.scene.currentBattle.double; const failIfDampCondition: MoveConditionFunc = (user, target, move) => { @@ -6855,8 +6853,7 @@ export function initMoves() { new StatusMove(Moves.DISABLE, Type.NORMAL, 100, 20, -1, 0, 1) .attr(AddBattlerTagAttr, BattlerTagType.DISABLED, false, true) .condition((user, target, move) => target.getMoveHistory().reverse().find(m => m.move !== Moves.NONE && m.move !== Moves.STRUGGLE && !m.virtual) !== undefined) - .ignoresSubstitute() - .condition(failOnMaxCondition), + .ignoresSubstitute(), new AttackMove(Moves.ACID, Type.POISON, MoveCategory.SPECIAL, 40, 100, 30, 10, 0, 1) .attr(StatStageChangeAttr, [ Stat.SPDEF ], -1) .target(MoveTarget.ALL_NEAR_ENEMIES), @@ -6894,8 +6891,7 @@ export function initMoves() { .attr(RecoilAttr) .recklessMove(), new AttackMove(Moves.LOW_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, 0, 1) - .attr(WeightPowerAttr) - .condition(failOnMaxCondition), + .attr(WeightPowerAttr), new AttackMove(Moves.COUNTER, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, -5, 1) .attr(CounterDamageAttr, (move: Move) => move.category === MoveCategory.PHYSICAL, 2) .target(MoveTarget.ATTACKER), @@ -8006,8 +8002,7 @@ export function initMoves() { .target(MoveTarget.ENEMY_SIDE), new AttackMove(Moves.GRASS_KNOT, Type.GRASS, MoveCategory.SPECIAL, -1, 100, 20, -1, 0, 4) .attr(WeightPowerAttr) - .makesContact() - .condition(failOnMaxCondition), + .makesContact(), new AttackMove(Moves.CHATTER, Type.FLYING, MoveCategory.SPECIAL, 65, 100, 20, 100, 0, 4) .attr(ConfuseAttr) .soundBased(), @@ -8109,8 +8104,7 @@ export function initMoves() { new AttackMove(Moves.HEAVY_SLAM, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5) .attr(MinimizeAccuracyAttr) .attr(CompareWeightPowerAttr) - .attr(HitsTagAttr, BattlerTagType.MINIMIZED, true) - .condition(failOnMaxCondition), + .attr(HitsTagAttr, BattlerTagType.MINIMIZED, true), new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5) .target(MoveTarget.ALL_NEAR_OTHERS) .condition(unknownTypeCondition) @@ -8262,8 +8256,7 @@ export function initMoves() { new AttackMove(Moves.HEAT_CRASH, Type.FIRE, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5) .attr(MinimizeAccuracyAttr) .attr(CompareWeightPowerAttr) - .attr(HitsTagAttr, BattlerTagType.MINIMIZED, true) - .condition(failOnMaxCondition), + .attr(HitsTagAttr, BattlerTagType.MINIMIZED, true), new AttackMove(Moves.LEAF_TORNADO, Type.GRASS, MoveCategory.SPECIAL, 65, 90, 10, 50, 0, 5) .attr(StatStageChangeAttr, [ Stat.ACC ], -1), new AttackMove(Moves.STEAMROLLER, Type.BUG, MoveCategory.PHYSICAL, 65, 100, 20, 30, 0, 5) diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index b87d89e3733..6614ef38253 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -29,7 +29,6 @@ import { Abilities } from "#app/enums/abilities"; import { LearnMovePhase } from "#app/phases/learn-move-phase"; import { LevelUpPhase } from "#app/phases/level-up-phase"; import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; -import { SpeciesFormKey } from "#app/data/pokemon-species"; export type ModifierPredicate = (modifier: Modifier) => boolean; @@ -1086,7 +1085,7 @@ export class EvolutionStatBoosterModifier extends StatBoosterModifier { * @returns true if the stat boosts can be applied, false otherwise */ shouldApply(args: any[]): boolean { - return super.shouldApply(args) && ((args[0] as Pokemon).getFormKey() !== SpeciesFormKey.GIGANTAMAX); + return super.shouldApply(args) && !(args[0] as Pokemon).isMax(); } /**