mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-09 00:49:27 +02:00
Ran linting
This commit is contained in:
parent
e7b5f5fe99
commit
d82c105d55
@ -4710,7 +4710,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
case StatusEffect.POISON:
|
case StatusEffect.POISON:
|
||||||
case StatusEffect.TOXIC:
|
case StatusEffect.TOXIC:
|
||||||
// Check for type based immunities and/or Corrosion from the applier.
|
// Check for type based immunities and/or Corrosion from the applier.
|
||||||
isImmune = types.some(defType => { // only 1 immunity needed to block
|
isImmune = types.some(defType => {
|
||||||
|
// only 1 immunity needed to block
|
||||||
if (defType !== PokemonType.POISON && defType !== PokemonType.STEEL) {
|
if (defType !== PokemonType.POISON && defType !== PokemonType.STEEL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -31,12 +31,16 @@ export class ObtainStatusEffectPhase extends PokemonPhase {
|
|||||||
private statusEffect: StatusEffect,
|
private statusEffect: StatusEffect,
|
||||||
private sourcePokemon: Pokemon | null = null,
|
private sourcePokemon: Pokemon | null = null,
|
||||||
private sleepTurnsRemaining = 0,
|
private sleepTurnsRemaining = 0,
|
||||||
private sourceText?: string | null = null, // TODO: This should take `undefined` instead of `null`
|
sourceText: string | null = null, // TODO: This should take `undefined` instead of `null`
|
||||||
private statusMessage = '',
|
private statusMessage = "",
|
||||||
) {
|
) {
|
||||||
super(battlerIndex);
|
super(battlerIndex);
|
||||||
|
|
||||||
this.statusMessage ||= getStatusEffectObtainText(statusEffect, getPokemonNameWithAffix(this.getPokemon()), sourceText ?? undefined)
|
this.statusMessage ||= getStatusEffectObtainText(
|
||||||
|
statusEffect,
|
||||||
|
getPokemonNameWithAffix(this.getPokemon()),
|
||||||
|
sourceText ?? undefined,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
@ -46,8 +50,7 @@ export class ObtainStatusEffectPhase extends PokemonPhase {
|
|||||||
pokemon.updateInfo(true);
|
pokemon.updateInfo(true);
|
||||||
|
|
||||||
new CommonBattleAnim(CommonAnim.POISON + (this.statusEffect - 1), pokemon).play(false, () => {
|
new CommonBattleAnim(CommonAnim.POISON + (this.statusEffect - 1), pokemon).play(false, () => {
|
||||||
globalScene.phaseManager.queueMessage(
|
globalScene.phaseManager.queueMessage(this.statusMessage);
|
||||||
this.statusMessage);
|
|
||||||
if (this.statusEffect && this.statusEffect !== StatusEffect.FAINT) {
|
if (this.statusEffect && this.statusEffect !== StatusEffect.FAINT) {
|
||||||
globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeStatusEffectTrigger, true);
|
globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeStatusEffectTrigger, true);
|
||||||
// If the status was applied from a move, ensure abilities are not ignored for follow-up triggers.
|
// If the status was applied from a move, ensure abilities are not ignored for follow-up triggers.
|
||||||
|
Loading…
Reference in New Issue
Block a user