Fix no faint bug with certain kinds of damage
parent
40058539a7
commit
59155b7c18
|
@ -106,7 +106,7 @@ export class ConfusedTag extends PseudoStatusTag {
|
|||
const atk = pokemon.getBattleStat(Stat.ATK);
|
||||
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));
|
||||
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 DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
||||
(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));
|
||||
|
||||
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 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
|
||||
|
||||
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()));
|
||||
}
|
||||
|
||||
|
|
|
@ -127,8 +127,6 @@ export class GameData {
|
|||
entry.caught = true;
|
||||
}
|
||||
|
||||
data[Species.SHAYMIN][1][1].caught = true;
|
||||
|
||||
this.dexData = data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue