mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-05-14 12:25:41 +01:00
[Bug] Add list of uncallable moves for Mirror Move (#5552)
* Add list of uncallable moves for Mirror Move * Mirror Move now respects the uncallable moves list --------- Co-authored-by: damocleas <damocleas25@gmail.com>
This commit is contained in:
parent
d0a9672e91
commit
4b8f1df8cd
@ -174,3 +174,69 @@ export const invalidCopycatMoves: ReadonlySet<Moves> = new Set([
|
||||
Moves.TRICK,
|
||||
Moves.WHIRLWIND,
|
||||
]);
|
||||
|
||||
export const invalidMirrorMoveMoves: ReadonlySet<Moves> = new Set([
|
||||
Moves.ACUPRESSURE,
|
||||
Moves.AFTER_YOU,
|
||||
Moves.AROMATIC_MIST,
|
||||
Moves.BEAK_BLAST,
|
||||
Moves.BELCH,
|
||||
Moves.CHILLY_RECEPTION,
|
||||
Moves.COACHING,
|
||||
Moves.CONVERSION_2,
|
||||
Moves.COUNTER,
|
||||
Moves.CRAFTY_SHIELD,
|
||||
Moves.CURSE,
|
||||
Moves.DECORATE,
|
||||
Moves.DOODLE,
|
||||
Moves.DOOM_DESIRE,
|
||||
Moves.DRAGON_CHEER,
|
||||
Moves.ELECTRIC_TERRAIN,
|
||||
Moves.FINAL_GAMBIT,
|
||||
Moves.FLORAL_HEALING,
|
||||
Moves.FLOWER_SHIELD,
|
||||
Moves.FOCUS_PUNCH,
|
||||
Moves.FUTURE_SIGHT,
|
||||
Moves.GEAR_UP,
|
||||
Moves.GRASSY_TERRAIN,
|
||||
Moves.GRAVITY,
|
||||
Moves.GUARD_SPLIT,
|
||||
Moves.HAIL,
|
||||
Moves.HAZE,
|
||||
Moves.HEAL_PULSE,
|
||||
Moves.HELPING_HAND,
|
||||
Moves.HOLD_HANDS,
|
||||
Moves.INSTRUCT,
|
||||
Moves.ION_DELUGE,
|
||||
Moves.MAGNETIC_FLUX,
|
||||
Moves.MAT_BLOCK,
|
||||
Moves.ME_FIRST,
|
||||
Moves.MIMIC,
|
||||
Moves.MIRROR_COAT,
|
||||
Moves.MIRROR_MOVE,
|
||||
Moves.MIST,
|
||||
Moves.MISTY_TERRAIN,
|
||||
Moves.MUD_SPORT,
|
||||
Moves.PERISH_SONG,
|
||||
Moves.POWER_SPLIT,
|
||||
Moves.PSYCH_UP,
|
||||
Moves.PSYCHIC_TERRAIN,
|
||||
Moves.PURIFY,
|
||||
Moves.QUICK_GUARD,
|
||||
Moves.RAIN_DANCE,
|
||||
Moves.REFLECT_TYPE,
|
||||
Moves.ROLE_PLAY,
|
||||
Moves.ROTOTILLER,
|
||||
Moves.SANDSTORM,
|
||||
Moves.SHELL_TRAP,
|
||||
Moves.SKETCH,
|
||||
Moves.SNOWSCAPE,
|
||||
Moves.SPIT_UP,
|
||||
Moves.SPOTLIGHT,
|
||||
Moves.STRUGGLE,
|
||||
Moves.SUNNY_DAY,
|
||||
Moves.TEATIME,
|
||||
Moves.TRANSFORM,
|
||||
Moves.WATER_SPORT,
|
||||
Moves.WIDE_GUARD,
|
||||
]);
|
||||
|
@ -125,7 +125,7 @@ import { MoveTarget } from "#enums/MoveTarget";
|
||||
import { MoveFlags } from "#enums/MoveFlags";
|
||||
import { MoveEffectTrigger } from "#enums/MoveEffectTrigger";
|
||||
import { MultiHitType } from "#enums/MultiHitType";
|
||||
import { invalidAssistMoves, invalidCopycatMoves, invalidMetronomeMoves, invalidSleepTalkMoves } from "./invalid-moves";
|
||||
import { invalidAssistMoves, invalidCopycatMoves, invalidMetronomeMoves, invalidMirrorMoveMoves, invalidSleepTalkMoves } from "./invalid-moves";
|
||||
|
||||
type MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => boolean;
|
||||
type UserMoveConditionFunc = (user: Pokemon, move: Move) => boolean;
|
||||
@ -6966,7 +6966,8 @@ export class CopyMoveAttr extends CallMoveAttr {
|
||||
getCondition(): MoveConditionFunc {
|
||||
return (user, target, move) => {
|
||||
if (this.mirrorMove) {
|
||||
return target.getMoveHistory().length !== 0;
|
||||
const lastMove = target.getLastXMoves()[0]?.move;
|
||||
return !!lastMove && !this.invalidMoves.has(lastMove);
|
||||
} else {
|
||||
const lastMove = globalScene.currentBattle.lastMove;
|
||||
return lastMove !== undefined && !this.invalidMoves.has(lastMove);
|
||||
@ -8562,7 +8563,7 @@ export function initMoves() {
|
||||
new SelfStatusMove(Moves.METRONOME, PokemonType.NORMAL, -1, 10, -1, 0, 1)
|
||||
.attr(RandomMoveAttr, invalidMetronomeMoves),
|
||||
new StatusMove(Moves.MIRROR_MOVE, PokemonType.FLYING, -1, 20, -1, 0, 1)
|
||||
.attr(CopyMoveAttr, true),
|
||||
.attr(CopyMoveAttr, true, invalidMirrorMoveMoves),
|
||||
new AttackMove(Moves.SELF_DESTRUCT, PokemonType.NORMAL, MoveCategory.PHYSICAL, 200, 100, 5, -1, 0, 1)
|
||||
.attr(SacrificialAttr)
|
||||
.makesContact(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user