mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-13 20:02:19 +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))
|
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();
|
||||||
|
Loading…
Reference in New Issue
Block a user