Fix crashing issues
This commit is contained in:
1 parent
ffa4c60011
commit
f7ca13d96e
5 files changed
+19
-10
No files matched your search
@@ -760,6 +760,7 @@ const enemyModifierPool = {
|
||||
new WeightedModifierType(modifierTypes.BASE_STAT_BOOSTER, 1)
|
||||
].map(m => { m.setTier(ModifierTier.GREAT); return m; }),
|
||||
[ModifierTier.ULTRA]: [
|
||||
new WeightedModifierType(modifierTypes.REVIVER_SEED, 2),
|
||||
new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 10),
|
||||
new WeightedModifierType(modifierTypes.FOCUS_BAND, 2),
|
||||
new WeightedModifierType(modifierTypes.LUCKY_EGG, 4),
|
||||
|
||||
@@ -682,7 +682,8 @@ export class PokemonInstantReviveModifier extends PokemonHeldItemModifier {
|
||||
apply(args: any[]): boolean {
|
||||
const pokemon = args[0] as Pokemon;
|
||||
|
||||
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(), Math.max(Math.floor(pokemon.getMaxHp() / 2)), getPokemonMessage(pokemon, ` was revived\nby its ${this.type.name}!`), false));
|
||||
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(),
|
||||
Math.max(Math.floor(pokemon.getMaxHp() / 2), 1),getPokemonMessage(pokemon, ` was revived\nby its ${this.type.name}!`), false, false, true));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user