mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
parent
4b084658d2
commit
5fd15a1173
@ -4,7 +4,7 @@ import * as Utils from "../utils";
|
|||||||
import { MoveCategory, StatChangeAttr, allMoves } from "./move";
|
import { MoveCategory, StatChangeAttr, allMoves } from "./move";
|
||||||
import { getPokemonMessage } from "../messages";
|
import { getPokemonMessage } from "../messages";
|
||||||
import Pokemon, { HitResult, PokemonMove } from "../field/pokemon";
|
import Pokemon, { HitResult, PokemonMove } from "../field/pokemon";
|
||||||
import {MoveEffectPhase, PokemonHealPhase, StatChangePhase} from "../phases";
|
import { MoveEffectPhase, StatChangePhase } from "../phases";
|
||||||
import { StatusEffect } from "./status-effect";
|
import { StatusEffect } from "./status-effect";
|
||||||
import { BattlerIndex } from "../battle";
|
import { BattlerIndex } from "../battle";
|
||||||
import { Moves } from "./enums/moves";
|
import { Moves } from "./enums/moves";
|
||||||
@ -146,26 +146,6 @@ class AuroraVeilTag extends WeakenMoveScreenTag {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class WishTag extends ArenaTag {
|
|
||||||
private slot: BattlerIndex;
|
|
||||||
private userName: string;
|
|
||||||
private health: number;
|
|
||||||
constructor(turnCount: integer, sourceId: integer, side: ArenaTagSide) {
|
|
||||||
super(ArenaTagType.WISH, turnCount, Moves.WISH, sourceId, side);
|
|
||||||
}
|
|
||||||
onAdd(arena: Arena): void {
|
|
||||||
const mon = arena.scene.getPokemonById(this.sourceId);
|
|
||||||
this.slot = mon.getBattlerIndex();
|
|
||||||
this.userName = mon.name;
|
|
||||||
this.health = mon.getMaxHp() / 2;
|
|
||||||
}
|
|
||||||
onRemove(arena: Arena): void {
|
|
||||||
const target = arena.scene.getField()[this.slot];
|
|
||||||
arena.scene.unshiftPhase(new PokemonHealPhase(target.scene, target.getBattlerIndex(),
|
|
||||||
Math.max(Math.floor(this.health), 1), this.userName + '\'s wish\ncame true!', true, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class WeakenMoveTypeTag extends ArenaTag {
|
export class WeakenMoveTypeTag extends ArenaTag {
|
||||||
private weakenedType: Type;
|
private weakenedType: Type;
|
||||||
|
|
||||||
@ -492,8 +472,6 @@ export function getArenaTag(tagType: ArenaTagType, turnCount: integer, sourceMov
|
|||||||
case ArenaTagType.FUTURE_SIGHT:
|
case ArenaTagType.FUTURE_SIGHT:
|
||||||
case ArenaTagType.DOOM_DESIRE:
|
case ArenaTagType.DOOM_DESIRE:
|
||||||
return new DelayedAttackTag(tagType, sourceMove, sourceId, targetIndex);
|
return new DelayedAttackTag(tagType, sourceMove, sourceId, targetIndex);
|
||||||
case ArenaTagType.WISH:
|
|
||||||
return new WishTag(turnCount, sourceId, side);
|
|
||||||
case ArenaTagType.STEALTH_ROCK:
|
case ArenaTagType.STEALTH_ROCK:
|
||||||
return new StealthRockTag(sourceId, side);
|
return new StealthRockTag(sourceId, side);
|
||||||
case ArenaTagType.STICKY_WEB:
|
case ArenaTagType.STICKY_WEB:
|
||||||
|
@ -14,6 +14,5 @@ export enum ArenaTagType {
|
|||||||
GRAVITY = "GRAVITY",
|
GRAVITY = "GRAVITY",
|
||||||
REFLECT = "REFLECT",
|
REFLECT = "REFLECT",
|
||||||
LIGHT_SCREEN = "LIGHT_SCREEN",
|
LIGHT_SCREEN = "LIGHT_SCREEN",
|
||||||
AURORA_VEIL = "AURORA_VEIL",
|
AURORA_VEIL = "AURORA_VEIL"
|
||||||
WISH = "WISH"
|
|
||||||
}
|
}
|
||||||
|
@ -4481,8 +4481,8 @@ export function initMoves() {
|
|||||||
.attr(AbilityCopyAttr),
|
.attr(AbilityCopyAttr),
|
||||||
new SelfStatusMove(Moves.WISH, Type.NORMAL, -1, 10, -1, 0, 3)
|
new SelfStatusMove(Moves.WISH, Type.NORMAL, -1, 10, -1, 0, 3)
|
||||||
.triageMove()
|
.triageMove()
|
||||||
.attr(AddArenaTagAttr, ArenaTagType.WISH, 2, true),
|
.unimplemented(),
|
||||||
new SelfStatusMove(Moves.ASSIST, Type.NORMAL, -1, 20, -1, 0, 3)
|
new SelfStatusMove(Moves.ASSIST, Type.NORMAL, -1, 20, -1, 0, 3)
|
||||||
.attr(RandomMovesetMoveAttr, true)
|
.attr(RandomMovesetMoveAttr, true)
|
||||||
.ignoresVirtual(),
|
.ignoresVirtual(),
|
||||||
new SelfStatusMove(Moves.INGRAIN, Type.GRASS, -1, 20, -1, 0, 3)
|
new SelfStatusMove(Moves.INGRAIN, Type.GRASS, -1, 20, -1, 0, 3)
|
||||||
|
Loading…
Reference in New Issue
Block a user