Implement Acrobatics

Currently scales from 0-5 items
This commit is contained in:
Xavion3 authored and Samuel H committed 2024-05-01 17:11:16 -04:00
1 parent d6ca09e431
commit 5a6ea40dae
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -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)
+6
View File
@@ -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());
}