mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-13 03:42:18 +02:00
Adjusted priorBoostArray to priorBoost integer
Only one values is relevant at a time, so the array was pointless, woops.
This commit is contained in:
parent
b71a424930
commit
37d0c1b6c8
@ -1792,12 +1792,12 @@ export class SwapStatsAttr extends MoveEffectAttr
|
||||
{
|
||||
if (!super.apply(user, target, move, args))
|
||||
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++)
|
||||
{
|
||||
priorBoostArray[s] = user.summonData.battleStats[s]; //Store user stat boosts
|
||||
user.summonData.battleStats[s] = target.summonData.battleStats[s]; //Applies target boosts to self
|
||||
target.summonData.battleStats[s] = priorBoostArray[s]; //Applies stored boosts to target
|
||||
priorBoost = user.summonData.battleStats[s]; //Store user stat boost
|
||||
user.summonData.battleStats[s] = target.summonData.battleStats[s]; //Applies target boost to self
|
||||
target.summonData.battleStats[s] = priorBoost; //Applies stored boost to target
|
||||
}
|
||||
target.updateInfo();
|
||||
user.updateInfo();
|
||||
|
Loading…
Reference in New Issue
Block a user