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);
|
let value = Math.floor(((2 * baseStat + this.ivs[s]) * this.level) * 0.01);
|
||||||
if (isHp) {
|
if (isHp) {
|
||||||
value = value + this.level + 10;
|
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;
|
value = 1;
|
||||||
if (this.hp > value || this.hp === undefined)
|
if (this.hp > value || this.hp === undefined)
|
||||||
this.hp = value;
|
this.hp = value;
|
||||||
|
|
|
@ -2976,19 +2976,23 @@ export class PostTurnStatusEffectPhase extends PokemonPhase {
|
||||||
if (!cancelled.value) {
|
if (!cancelled.value) {
|
||||||
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectActivationText(pokemon.status.effect)));
|
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectActivationText(pokemon.status.effect)));
|
||||||
let damage: integer = 0;
|
let damage: integer = 0;
|
||||||
|
let statusDamage: boolean = false;
|
||||||
switch (pokemon.status.effect) {
|
switch (pokemon.status.effect) {
|
||||||
case StatusEffect.POISON:
|
case StatusEffect.POISON:
|
||||||
damage = Math.max(pokemon.getMaxHp() >> 3, 1);
|
damage = Math.max(pokemon.getMaxHp() >> 3, 1);
|
||||||
|
statusDamage = true;
|
||||||
break;
|
break;
|
||||||
case StatusEffect.TOXIC:
|
case StatusEffect.TOXIC:
|
||||||
damage = Math.max(Math.floor((pokemon.getMaxHp() / 16) * pokemon.status.turnCount), 1);
|
damage = Math.max(Math.floor((pokemon.getMaxHp() / 16) * pokemon.status.turnCount), 1);
|
||||||
|
statusDamage = true;
|
||||||
break;
|
break;
|
||||||
case StatusEffect.BURN:
|
case StatusEffect.BURN:
|
||||||
damage = Math.max(pokemon.getMaxHp() >> 4, 1);
|
damage = Math.max(pokemon.getMaxHp() >> 4, 1);
|
||||||
|
statusDamage = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (damage) {
|
if (damage) {
|
||||||
this.scene.damageNumberHandler.add(this.getPokemon(), pokemon.damage(damage));
|
this.scene.damageNumberHandler.add(this.getPokemon(), pokemon.damage(damage, statusDamage));
|
||||||
pokemon.updateInfo();
|
pokemon.updateInfo();
|
||||||
}
|
}
|
||||||
new CommonBattleAnim(CommonAnim.POISON + (pokemon.status.effect - 1), pokemon).play(this.scene, () => this.end());
|
new CommonBattleAnim(CommonAnim.POISON + (pokemon.status.effect - 1), pokemon).play(this.scene, () => this.end());
|
||||||
|
|
Loading…
Reference in New Issue