[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>
This commit is contained in:
parent
e6cffc6a93
commit
8164ec596e
|
@ -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 {
|
applyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean {
|
||||||
if (attacker.getTag(BattlerTagType.DISABLED) === null) {
|
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) {
|
if (simulated) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -524,10 +524,6 @@ export class FlinchedTag extends BattlerTag {
|
||||||
applyAbAttrs(FlinchEffectAbAttr, pokemon, null);
|
applyAbAttrs(FlinchEffectAbAttr, pokemon, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
canAdd(pokemon: Pokemon): boolean {
|
|
||||||
return !pokemon.isMax();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels the Pokemon's next Move on the turn this tag is applied
|
* Cancels the Pokemon's next Move on the turn this tag is applied
|
||||||
* @param pokemon The {@linkcode Pokemon} with this tag
|
* @param pokemon The {@linkcode Pokemon} with this tag
|
||||||
|
@ -878,10 +874,6 @@ export class EncoreTag extends BattlerTag {
|
||||||
}
|
}
|
||||||
|
|
||||||
canAdd(pokemon: Pokemon): boolean {
|
canAdd(pokemon: Pokemon): boolean {
|
||||||
if (pokemon.isMax()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const lastMoves = pokemon.getLastXMoves(1);
|
const lastMoves = pokemon.getLastXMoves(1);
|
||||||
if (!lastMoves.length) {
|
if (!lastMoves.length) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1060,19 +1052,11 @@ export class MinimizeTag extends BattlerTag {
|
||||||
super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE);
|
super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
canAdd(pokemon: Pokemon): boolean {
|
|
||||||
return !pokemon.isMax();
|
|
||||||
}
|
|
||||||
|
|
||||||
onAdd(pokemon: Pokemon): void {
|
onAdd(pokemon: Pokemon): void {
|
||||||
super.onAdd(pokemon);
|
super.onAdd(pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
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);
|
return lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5248,7 +5248,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6458,8 +6458,6 @@ const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.
|
||||||
|
|
||||||
const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune();
|
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 failIfSingleBattle: MoveConditionFunc = (user, target, move) => user.scene.currentBattle.double;
|
||||||
|
|
||||||
const failIfDampCondition: MoveConditionFunc = (user, target, move) => {
|
const failIfDampCondition: MoveConditionFunc = (user, target, move) => {
|
||||||
|
@ -6855,8 +6853,7 @@ export function initMoves() {
|
||||||
new StatusMove(Moves.DISABLE, Type.NORMAL, 100, 20, -1, 0, 1)
|
new StatusMove(Moves.DISABLE, Type.NORMAL, 100, 20, -1, 0, 1)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.DISABLED, false, true)
|
.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)
|
.condition((user, target, move) => target.getMoveHistory().reverse().find(m => m.move !== Moves.NONE && m.move !== Moves.STRUGGLE && !m.virtual) !== undefined)
|
||||||
.ignoresSubstitute()
|
.ignoresSubstitute(),
|
||||||
.condition(failOnMaxCondition),
|
|
||||||
new AttackMove(Moves.ACID, Type.POISON, MoveCategory.SPECIAL, 40, 100, 30, 10, 0, 1)
|
new AttackMove(Moves.ACID, Type.POISON, MoveCategory.SPECIAL, 40, 100, 30, 10, 0, 1)
|
||||||
.attr(StatStageChangeAttr, [ Stat.SPDEF ], -1)
|
.attr(StatStageChangeAttr, [ Stat.SPDEF ], -1)
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
|
@ -6894,8 +6891,7 @@ export function initMoves() {
|
||||||
.attr(RecoilAttr)
|
.attr(RecoilAttr)
|
||||||
.recklessMove(),
|
.recklessMove(),
|
||||||
new AttackMove(Moves.LOW_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, 0, 1)
|
new AttackMove(Moves.LOW_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, 0, 1)
|
||||||
.attr(WeightPowerAttr)
|
.attr(WeightPowerAttr),
|
||||||
.condition(failOnMaxCondition),
|
|
||||||
new AttackMove(Moves.COUNTER, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, -5, 1)
|
new AttackMove(Moves.COUNTER, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, -5, 1)
|
||||||
.attr(CounterDamageAttr, (move: Move) => move.category === MoveCategory.PHYSICAL, 2)
|
.attr(CounterDamageAttr, (move: Move) => move.category === MoveCategory.PHYSICAL, 2)
|
||||||
.target(MoveTarget.ATTACKER),
|
.target(MoveTarget.ATTACKER),
|
||||||
|
@ -8006,8 +8002,7 @@ export function initMoves() {
|
||||||
.target(MoveTarget.ENEMY_SIDE),
|
.target(MoveTarget.ENEMY_SIDE),
|
||||||
new AttackMove(Moves.GRASS_KNOT, Type.GRASS, MoveCategory.SPECIAL, -1, 100, 20, -1, 0, 4)
|
new AttackMove(Moves.GRASS_KNOT, Type.GRASS, MoveCategory.SPECIAL, -1, 100, 20, -1, 0, 4)
|
||||||
.attr(WeightPowerAttr)
|
.attr(WeightPowerAttr)
|
||||||
.makesContact()
|
.makesContact(),
|
||||||
.condition(failOnMaxCondition),
|
|
||||||
new AttackMove(Moves.CHATTER, Type.FLYING, MoveCategory.SPECIAL, 65, 100, 20, 100, 0, 4)
|
new AttackMove(Moves.CHATTER, Type.FLYING, MoveCategory.SPECIAL, 65, 100, 20, 100, 0, 4)
|
||||||
.attr(ConfuseAttr)
|
.attr(ConfuseAttr)
|
||||||
.soundBased(),
|
.soundBased(),
|
||||||
|
@ -8109,8 +8104,7 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.HEAVY_SLAM, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.HEAVY_SLAM, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5)
|
||||||
.attr(MinimizeAccuracyAttr)
|
.attr(MinimizeAccuracyAttr)
|
||||||
.attr(CompareWeightPowerAttr)
|
.attr(CompareWeightPowerAttr)
|
||||||
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
|
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true),
|
||||||
.condition(failOnMaxCondition),
|
|
||||||
new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
||||||
.target(MoveTarget.ALL_NEAR_OTHERS)
|
.target(MoveTarget.ALL_NEAR_OTHERS)
|
||||||
.condition(unknownTypeCondition)
|
.condition(unknownTypeCondition)
|
||||||
|
@ -8262,8 +8256,7 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.HEAT_CRASH, Type.FIRE, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.HEAT_CRASH, Type.FIRE, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5)
|
||||||
.attr(MinimizeAccuracyAttr)
|
.attr(MinimizeAccuracyAttr)
|
||||||
.attr(CompareWeightPowerAttr)
|
.attr(CompareWeightPowerAttr)
|
||||||
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
|
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true),
|
||||||
.condition(failOnMaxCondition),
|
|
||||||
new AttackMove(Moves.LEAF_TORNADO, Type.GRASS, MoveCategory.SPECIAL, 65, 90, 10, 50, 0, 5)
|
new AttackMove(Moves.LEAF_TORNADO, Type.GRASS, MoveCategory.SPECIAL, 65, 90, 10, 50, 0, 5)
|
||||||
.attr(StatStageChangeAttr, [ Stat.ACC ], -1),
|
.attr(StatStageChangeAttr, [ Stat.ACC ], -1),
|
||||||
new AttackMove(Moves.STEAMROLLER, Type.BUG, MoveCategory.PHYSICAL, 65, 100, 20, 30, 0, 5)
|
new AttackMove(Moves.STEAMROLLER, Type.BUG, MoveCategory.PHYSICAL, 65, 100, 20, 30, 0, 5)
|
||||||
|
|
|
@ -29,7 +29,6 @@ import { Abilities } from "#app/enums/abilities";
|
||||||
import { LearnMovePhase } from "#app/phases/learn-move-phase";
|
import { LearnMovePhase } from "#app/phases/learn-move-phase";
|
||||||
import { LevelUpPhase } from "#app/phases/level-up-phase";
|
import { LevelUpPhase } from "#app/phases/level-up-phase";
|
||||||
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
|
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
|
||||||
import { SpeciesFormKey } from "#app/data/pokemon-species";
|
|
||||||
|
|
||||||
export type ModifierPredicate = (modifier: Modifier) => boolean;
|
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
|
* @returns true if the stat boosts can be applied, false otherwise
|
||||||
*/
|
*/
|
||||||
shouldApply(args: any[]): boolean {
|
shouldApply(args: any[]): boolean {
|
||||||
return super.shouldApply(args) && ((args[0] as Pokemon).getFormKey() !== SpeciesFormKey.GIGANTAMAX);
|
return super.shouldApply(args) && !(args[0] as Pokemon).isMax();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue