Implement Gastro Acid (#393)

pull/394/head
Xavion3 2024-05-02 14:22:30 +10:00 committed by GitHub
parent ba5bef123c
commit 6d9424e431
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 1 deletions

View File

@ -3594,6 +3594,25 @@ export class SwitchAbilitiesAttr extends MoveEffectAttr {
}
}
export class SuppressAbilitiesAttr extends MoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!super.apply(user, target, move, args))
return false;
target.summonData.abilitySuppressed = true;
target.scene.queueMessage(getPokemonMessage(target, ` ability\nwas suppressed!`));
return true;
}
getCondition(): MoveConditionFunc {
return (user, target, move) => !target.getAbility().hasAttr(UnsuppressableAbilityAbAttr);
}
}
export class TransformAttr extends MoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
return new Promise(resolve => {
@ -4831,7 +4850,7 @@ export function initMoves() {
new SelfStatusMove(Moves.POWER_TRICK, Type.PSYCHIC, -1, 10, -1, 0, 4)
.unimplemented(),
new StatusMove(Moves.GASTRO_ACID, Type.POISON, 100, 10, -1, 0, 4)
.unimplemented(),
.attr(SuppressAbilitiesAttr),
new StatusMove(Moves.LUCKY_CHANT, Type.NORMAL, -1, 30, -1, 0, 4)
.attr(AddBattlerTagAttr, BattlerTagType.NO_CRIT, false, false, 5)
.target(MoveTarget.USER_SIDE)