This commit is contained in:
André Bastos Dias 2026-06-02 14:05:46 +01:00 committed by GitHub
commit 3c773eb972
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -662,7 +662,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
imprison: {
inherit: true,
flags: { bypasssub: 1, metronome: 1 },
flags: { bypasssub: 1, metronome: 1, mustpressure: 1 },
onTryHit(pokemon) {
for (const target of pokemon.foes()) {
for (const move of pokemon.moves) {

View File

@ -852,7 +852,7 @@ export class Pokemon {
// Resolve apparent targets for Pressure.
let pressureTargets = targets;
if (move.target === 'foeSide') {
if (move.target === 'foeSide' || (move.target === 'all' && move.id !== 'perishsong' && this.battle.gen <= 3)) {
pressureTargets = [];
}
if (move.flags['mustpressure']) {
@ -863,7 +863,7 @@ export class Pokemon {
}
ignoringAbility() {
if (this.battle.gen >= 5 && !this.isActive) return true;
if ((this.battle.gen >= 5 && !this.isActive) || this.fainted) return true;
// Certain Abilities won't activate while Transformed, even if they ordinarily couldn't be suppressed (e.g. Disguise)
if (this.getAbility().flags['notransform'] && this.transformed) return true;
@ -884,8 +884,8 @@ export class Pokemon {
}
ignoringItem(isFling = false) {
if ((this.battle.gen >= 5 && !this.isActive) || this.fainted) return true;
if (this.getItem().isPrimalOrb) return false;
if (this.battle.gen >= 5 && !this.isActive) return true;
if (this.volatiles['embargo'] || this.battle.field.pseudoWeather['magicroom']) return true;
// check Fling first to avoid infinite recursion
if (isFling) return this.battle.gen >= 5 && this.hasAbility('klutz');