Updated ElectroShotChargeAttr

Moved the Sp Atk boost to be inside the ElectroShotChargeAttr function
This commit is contained in:
EmoUsedHM01 2024-04-12 10:05:22 +01:00 committed by GitHub
parent 44b97b0239
commit 7f099f76c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1223,6 +1223,8 @@ export class SunlightChargeAttr extends ChargeAttr {
export class ElectroShotChargeAttr extends ChargeAttr { export class ElectroShotChargeAttr extends ChargeAttr {
constructor() { constructor() {
super(ChargeAnim.ELECTRO_SHOT_CHARGING, 'absorbed electricity!', null, true); super(ChargeAnim.ELECTRO_SHOT_CHARGING, 'absorbed electricity!', null, true);
// Add the StatChangeAttr functionality here so it always applies first
this.attr(StatChangeAttr, BattleStat.SPATK, 1, true);
} }
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
@ -5246,7 +5248,6 @@ export function initMoves() {
.attr(HighCritAttr) .attr(HighCritAttr)
.makesContact(false), .makesContact(false),
new AttackMove(Moves.ELECTRO_SHOT, "Electro Shot", Type.ELECTRIC, MoveCategory.SPECIAL, 130, 100, 10, "The user gathers electricity on the first turn, boosting its Sp. Atk stat, then fires a high-voltage shot on the next turn. The shot will be fired immediately in rain.", 100, 0, 9) new AttackMove(Moves.ELECTRO_SHOT, "Electro Shot", Type.ELECTRIC, MoveCategory.SPECIAL, 130, 100, 10, "The user gathers electricity on the first turn, boosting its Sp. Atk stat, then fires a high-voltage shot on the next turn. The shot will be fired immediately in rain.", 100, 0, 9)
.attr(StatChangeAttr, BattleStat.SPATK, 1, true) // Raises stat before attacking
.attr(ElectroShotChargeAttr) .attr(ElectroShotChargeAttr)
.ignoresVirtual(), .ignoresVirtual(),
new AttackMove(Moves.TERA_STARSTORM, "Tera Starstorm (P)", Type.NORMAL, MoveCategory.SPECIAL, 120, 100, 5, "With the power of its crystals, the user bombards and eliminates the target. When used by Terapagos in its Stellar Form, this move damages all opposing Pokémon.", -1, 0, 9) new AttackMove(Moves.TERA_STARSTORM, "Tera Starstorm (P)", Type.NORMAL, MoveCategory.SPECIAL, 120, 100, 5, "With the power of its crystals, the user bombards and eliminates the target. When used by Terapagos in its Stellar Form, this move damages all opposing Pokémon.", -1, 0, 9)