Add switch out preventing to traps
This commit is contained in:
1 parent
f13302e28f
commit
2ac0a3645f
10 files changed
+190
-122
No files matched your search
@@ -272,13 +272,13 @@ export class PokemonBaseStatBoosterModifierType extends PokemonHeldItemModifierT
|
||||
|
||||
class AllPokemonFullHpRestoreModifierType extends ModifierType {
|
||||
constructor(name: string, description?: string, newModifierFunc?: NewModifierFunc, iconImage?: string) {
|
||||
super(name, description || `Restore 100% HP for all POKéMON`, newModifierFunc || ((_type, _args) => new Modifiers.PokemonHpRestoreModifier(this, -1, 100, false)), iconImage);
|
||||
super(name, description || `Restore 100% HP for all POKéMON`, newModifierFunc || ((_type, _args) => new Modifiers.PokemonHpRestoreModifier(this, -1, 100, true)), iconImage);
|
||||
}
|
||||
}
|
||||
|
||||
class AllPokemonFullReviveModifierType extends AllPokemonFullHpRestoreModifierType {
|
||||
constructor(name: string, iconImage?: string) {
|
||||
super(name, `Revives all fainted POKéMON, restoring 100% HP`, (_type, _args) => new Modifiers.PokemonHpRestoreModifier(this, -1, 100, true), iconImage);
|
||||
super(name, `Revives all fainted POKéMON, restoring 100% HP`, (_type, _args) => new Modifiers.PokemonHpRestoreModifier(this, -1, 100, true, true), iconImage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -279,9 +279,8 @@ export abstract class PokemonHeldItemModifier extends PersistentModifier {
|
||||
return container;
|
||||
}
|
||||
|
||||
getPokemon(scene: BattleScene) {
|
||||
const findInParty = (party: Pokemon[]) => party.find(p => p.id === this.pokemonId);
|
||||
return findInParty(scene.getParty()) || findInParty(scene.getEnemyParty());
|
||||
getPokemon(scene: BattleScene): Pokemon {
|
||||
return scene.getPokemonById(this.pokemonId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user