Update src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
This commit is contained in:
ImperialSympathizer 2024-07-19 17:26:18 -04:00 committed by GitHub
parent f80901f7b9
commit 12cd014e11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -186,7 +186,8 @@ export const FieryFalloutEncounter: IMysteryEncounter =
// Burn random member
const burnable = nonFireTypes.filter(p => isNullOrUndefined(p.status) || isNullOrUndefined(p.status.effect) || p.status?.effect === StatusEffect.BURN);
if (burnable?.length > 0) {
const chosenPokemon = burnable[randSeedInt(burnable.length - 1)];
const roll = randSeedInt(burnable.length);
const chosenPokemon = burnable[roll];
if (chosenPokemon.trySetStatus(StatusEffect.BURN)) {
// Burn applied
encounter.setDialogueToken("burnedPokemon", chosenPokemon.name);