This commit is contained in:
torranx 2024-09-08 15:27:24 +08:00
parent 2038799ba8
commit 04bb544bc7

View File

@ -6018,9 +6018,7 @@ export class SwapStatAttr extends MoveEffectAttr {
* @extends MoveEffectAttr * @extends MoveEffectAttr
*/ */
export class ShiftStatAttr extends MoveEffectAttr { export class ShiftStatAttr extends MoveEffectAttr {
/** The stat to switch */
private statToSwitch: EffectiveStat; private statToSwitch: EffectiveStat;
/** The stat to switch with */
private statToSwitchWith: EffectiveStat; private statToSwitchWith: EffectiveStat;
constructor(statToSwitch: EffectiveStat, statToSwitchWith: EffectiveStat) { constructor(statToSwitch: EffectiveStat, statToSwitchWith: EffectiveStat) {
@ -6038,7 +6036,7 @@ export class ShiftStatAttr extends MoveEffectAttr {
* @param args n/a * @param args n/a
* @returns whether the effect was applied * @returns whether the effect was applied
*/ */
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!super.apply(user, target, move, args)) { if (!super.apply(user, target, move, args)) {
return false; return false;
} }
@ -6065,7 +6063,7 @@ export class ShiftStatAttr extends MoveEffectAttr {
* @param move n/a * @param move n/a
* @returns number of points to add to the user's benefit score * @returns number of points to add to the user's benefit score
*/ */
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { override getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
return user.getStat(this.statToSwitchWith, false) > user.getStat(this.statToSwitch, false) ? 10 : 0; return user.getStat(this.statToSwitchWith, false) > user.getStat(this.statToSwitch, false) ? 10 : 0;
} }
} }