parent
d6ca09e431
commit
5a6ea40dae
|
@ -5171,7 +5171,7 @@ export function initMoves() {
|
|||
new StatusMove(Moves.QUASH, Type.DARK, 100, 15, -1, 0, 5)
|
||||
.unimplemented(),
|
||||
new AttackMove(Moves.ACROBATICS, Type.FLYING, MoveCategory.PHYSICAL, 55, 100, 15, -1, 0, 5)
|
||||
.partial(),
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => Math.max(1, 2 - 0.2 * user.getHeldItems().reduce((v, m) => v + m.stackCount, 0))),
|
||||
new StatusMove(Moves.REFLECT_TYPE, Type.NORMAL, -1, 15, -1, 0, 5)
|
||||
.attr(CopyTypeAttr),
|
||||
new AttackMove(Moves.RETALIATE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 5, -1, 0, 5)
|
||||
|
|
|
@ -456,6 +456,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
return 1;
|
||||
}
|
||||
|
||||
getHeldItems(): PokemonHeldItemModifier[] {
|
||||
if (!this.scene)
|
||||
return [];
|
||||
return this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier && (m as PokemonHeldItemModifier).pokemonId === this.id, this.isPlayer()) as PokemonHeldItemModifier[];
|
||||
}
|
||||
|
||||
updateScale(): void {
|
||||
this.setScale(this.getSpriteScale());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue