mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-12-01 19:26:16 +00:00
Fix no faint bug with certain kinds of damage
This commit is contained in:
parent
40058539a7
commit
59155b7c18
@ -106,7 +106,7 @@ export class ConfusedTag extends PseudoStatusTag {
|
|||||||
const atk = pokemon.getBattleStat(Stat.ATK);
|
const atk = pokemon.getBattleStat(Stat.ATK);
|
||||||
const def = pokemon.getBattleStat(Stat.DEF);
|
const def = pokemon.getBattleStat(Stat.DEF);
|
||||||
const damage = Math.ceil(((((2 * pokemon.level / 5 + 2) * 40 * atk / def) / 50) + 2) * ((Utils.randInt(15) + 85) / 100));
|
const damage = Math.ceil(((((2 * pokemon.level / 5 + 2) * 40 * atk / def) / 50) + 2) * ((Utils.randInt(15) + 85) / 100));
|
||||||
pokemon.hp = Math.max(pokemon.hp - damage, 0);
|
pokemon.damage(damage);
|
||||||
pokemon.scene.unshiftPhase(new MessagePhase(pokemon.scene, 'It hurt itself in its\nconfusion!'));
|
pokemon.scene.unshiftPhase(new MessagePhase(pokemon.scene, 'It hurt itself in its\nconfusion!'));
|
||||||
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
||||||
(pokemon.scene.getCurrentPhase() as MovePhase).cancel();
|
(pokemon.scene.getCurrentPhase() as MovePhase).cancel();
|
||||||
@ -136,7 +136,7 @@ export class SeedTag extends PseudoStatusTag {
|
|||||||
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, !pokemon.isPlayer(), CommonAnim.LEECH_SEED));
|
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, !pokemon.isPlayer(), CommonAnim.LEECH_SEED));
|
||||||
|
|
||||||
const damage = Math.max(Math.floor(pokemon.getMaxHp() / 8), 1);
|
const damage = Math.max(Math.floor(pokemon.getMaxHp() / 8), 1);
|
||||||
pokemon.hp = Math.max(pokemon.hp - damage, 0);
|
pokemon.damage(damage);
|
||||||
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
||||||
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, !pokemon.isPlayer(), damage, getPokemonMessage(pokemon, '\'s health is\nsapped by LEECH SEED!'), false, true));
|
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, !pokemon.isPlayer(), damage, getPokemonMessage(pokemon, '\'s health is\nsapped by LEECH SEED!'), false, true));
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ export class NightmareTag extends PseudoStatusTag {
|
|||||||
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, pokemon.isPlayer(), CommonAnim.CURSE)); // TODO: Update animation type
|
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, pokemon.isPlayer(), CommonAnim.CURSE)); // TODO: Update animation type
|
||||||
|
|
||||||
const damage = Math.ceil(pokemon.getMaxHp() / 4);
|
const damage = Math.ceil(pokemon.getMaxHp() / 4);
|
||||||
pokemon.hp = Math.max(pokemon.hp - damage, 0);
|
pokemon.damage(damage);
|
||||||
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,8 +127,6 @@ export class GameData {
|
|||||||
entry.caught = true;
|
entry.caught = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
data[Species.SHAYMIN][1][1].caught = true;
|
|
||||||
|
|
||||||
this.dexData = data;
|
this.dexData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user