Adjusted priorBoostArray to priorBoost integer

Only one values is relevant at a time, so the array was pointless, woops.
This commit is contained in:
notpatchmaybe 2024-05-11 10:06:52 +01:00 committed by GitHub
parent b71a424930
commit 37d0c1b6c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1792,12 +1792,12 @@ export class SwapStatsAttr extends MoveEffectAttr
{ {
if (!super.apply(user, target, move, args)) if (!super.apply(user, target, move, args))
return false; //Exits if the move can't apply return false; //Exits if the move can't apply
let priorBoostArray : integer[] = [ 0, 0, 0, 0, 0, 0, 0 ]; //For storing user stat boosts let priorBoost : integer; //For storing a stat boost
for (let s = 0; s < target.summonData.battleStats.length; s++) for (let s = 0; s < target.summonData.battleStats.length; s++)
{ {
priorBoostArray[s] = user.summonData.battleStats[s]; //Store user stat boosts priorBoost = user.summonData.battleStats[s]; //Store user stat boost
user.summonData.battleStats[s] = target.summonData.battleStats[s]; //Applies target boosts to self user.summonData.battleStats[s] = target.summonData.battleStats[s]; //Applies target boost to self
target.summonData.battleStats[s] = priorBoostArray[s]; //Applies stored boosts to target target.summonData.battleStats[s] = priorBoost; //Applies stored boost to target
} }
target.updateInfo(); target.updateInfo();
user.updateInfo(); user.updateInfo();