mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Add Acrobatics effect
This commit is contained in:
parent
cf2bd4d3da
commit
c98be493a1
@ -1749,6 +1749,24 @@ export class TurnDamagedDoublePowerAttr extends VariablePowerAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class NoHeldItemDoublePowerAttr extends VariablePowerAttr {
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
const heldItems = this.getUserHeldItems(user);
|
||||||
|
|
||||||
|
if (!heldItems.length) {
|
||||||
|
(args[0] as Utils.NumberHolder).value *= 2;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
getUserHeldItems(user: Pokemon) {
|
||||||
|
return user.scene.findModifiers(m => m instanceof PokemonHeldItemModifier
|
||||||
|
&& (m as PokemonHeldItemModifier).pokemonId === user.id, user.isPlayer()) as PokemonHeldItemModifier[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const magnitudeMessageFunc = (user: Pokemon, target: Pokemon, move: Move) => {
|
const magnitudeMessageFunc = (user: Pokemon, target: Pokemon, move: Move) => {
|
||||||
let message: string;
|
let message: string;
|
||||||
user.scene.executeWithSeedOffset(() => {
|
user.scene.executeWithSeedOffset(() => {
|
||||||
@ -4874,7 +4892,7 @@ export function initMoves() {
|
|||||||
new StatusMove(Moves.QUASH, Type.DARK, 100, 15, -1, 0, 5)
|
new StatusMove(Moves.QUASH, Type.DARK, 100, 15, -1, 0, 5)
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new AttackMove(Moves.ACROBATICS, Type.FLYING, MoveCategory.PHYSICAL, 55, 100, 15, -1, 0, 5)
|
new AttackMove(Moves.ACROBATICS, Type.FLYING, MoveCategory.PHYSICAL, 55, 100, 15, -1, 0, 5)
|
||||||
.partial(),
|
.attr(NoHeldItemDoublePowerAttr),
|
||||||
new StatusMove(Moves.REFLECT_TYPE, Type.NORMAL, -1, 15, -1, 0, 5)
|
new StatusMove(Moves.REFLECT_TYPE, Type.NORMAL, -1, 15, -1, 0, 5)
|
||||||
.attr(CopyTypeAttr),
|
.attr(CopyTypeAttr),
|
||||||
new AttackMove(Moves.RETALIATE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 5, -1, 0, 5)
|
new AttackMove(Moves.RETALIATE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 5, -1, 0, 5)
|
||||||
|
Loading…
Reference in New Issue
Block a user