Do not trigger focus band effect on status damage
parent
4e279224c5
commit
f0872ed608
|
@ -630,7 +630,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
let value = Math.floor(((2 * baseStat + this.ivs[s]) * this.level) * 0.01);
|
||||
if (isHp) {
|
||||
value = value + this.level + 10;
|
||||
if (this.hasAbility(Abilities.WONDER_GUARD, false, true))
|
||||
if (this.hasAbility(Abilities.WONDER_GUARD, false, true) || this.species.speciesId == Species.SHEDINJA)
|
||||
value = 1;
|
||||
if (this.hp > value || this.hp === undefined)
|
||||
this.hp = value;
|
||||
|
|
|
@ -2976,19 +2976,23 @@ export class PostTurnStatusEffectPhase extends PokemonPhase {
|
|||
if (!cancelled.value) {
|
||||
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectActivationText(pokemon.status.effect)));
|
||||
let damage: integer = 0;
|
||||
let statusDamage: boolean = false;
|
||||
switch (pokemon.status.effect) {
|
||||
case StatusEffect.POISON:
|
||||
damage = Math.max(pokemon.getMaxHp() >> 3, 1);
|
||||
statusDamage = true;
|
||||
break;
|
||||
case StatusEffect.TOXIC:
|
||||
damage = Math.max(Math.floor((pokemon.getMaxHp() / 16) * pokemon.status.turnCount), 1);
|
||||
statusDamage = true;
|
||||
break;
|
||||
case StatusEffect.BURN:
|
||||
damage = Math.max(pokemon.getMaxHp() >> 4, 1);
|
||||
statusDamage = true;
|
||||
break;
|
||||
}
|
||||
if (damage) {
|
||||
this.scene.damageNumberHandler.add(this.getPokemon(), pokemon.damage(damage));
|
||||
this.scene.damageNumberHandler.add(this.getPokemon(), pokemon.damage(damage, statusDamage));
|
||||
pokemon.updateInfo();
|
||||
}
|
||||
new CommonBattleAnim(CommonAnim.POISON + (pokemon.status.effect - 1), pokemon).play(this.scene, () => this.end());
|
||||
|
|
Loading…
Reference in New Issue