mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
Move rand
value
I had done the randSeedInt value in the wrong place, so the value wasn't saving to the session data properly, so that has been fixed.
This commit is contained in:
parent
b8e87eb488
commit
ab44755d4b
@ -451,6 +451,11 @@ export class SingleGenerationChallenge extends Challenge {
|
|||||||
|
|
||||||
applyFixedBattle(waveIndex: Number, battleConfig: FixedBattleConfig): boolean {
|
applyFixedBattle(waveIndex: Number, battleConfig: FixedBattleConfig): boolean {
|
||||||
let trainerTypes: TrainerType[] = [];
|
let trainerTypes: TrainerType[] = [];
|
||||||
|
if (this.rand === 0 && this.value === 3 || this.value === 7) {
|
||||||
|
/** Currently used for determining the evil team when there is more than one for a given generation. */
|
||||||
|
const rand = Utils.randSeedInt(2, 1);
|
||||||
|
this.rand = rand;
|
||||||
|
}
|
||||||
switch (waveIndex) {
|
switch (waveIndex) {
|
||||||
case 35:
|
case 35:
|
||||||
trainerTypes = [ TrainerType.ROCKET_GRUNT, TrainerType.ROCKET_GRUNT, TrainerType.UNKNOWN, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT, TrainerType.UNKNOWN, TrainerType.MACRO_GRUNT, TrainerType.STAR_GRUNT ];
|
trainerTypes = [ TrainerType.ROCKET_GRUNT, TrainerType.ROCKET_GRUNT, TrainerType.UNKNOWN, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT, TrainerType.UNKNOWN, TrainerType.MACRO_GRUNT, TrainerType.STAR_GRUNT ];
|
||||||
@ -689,8 +694,7 @@ export class SingleGenerationChallenge extends Challenge {
|
|||||||
const newChallenge = new SingleGenerationChallenge();
|
const newChallenge = new SingleGenerationChallenge();
|
||||||
newChallenge.value = source.value;
|
newChallenge.value = source.value;
|
||||||
newChallenge.severity = source.severity;
|
newChallenge.severity = source.severity;
|
||||||
/** Currently used for determining the evil team when there is more than one for a given generation. */
|
newChallenge.rand = source.rand;
|
||||||
newChallenge.rand = Utils.randSeedInt(2, 1);
|
|
||||||
return newChallenge;
|
return newChallenge;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user