mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Added pokemon.getPassive check to support new passives
This commit is contained in:
parent
8336f4ffe1
commit
33f6214dc7
@ -2761,7 +2761,7 @@ export class PostTurnStatusEffectPhase extends PokemonPhase {
|
|||||||
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectActivationText(pokemon.status.effect)));
|
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectActivationText(pokemon.status.effect)));
|
||||||
|
|
||||||
let netEffect = 0; // This variable now handles both healing and damage
|
let netEffect = 0; // This variable now handles both healing and damage
|
||||||
const isHealing = pokemon.getAbility().id === Abilities.POISON_HEAL;
|
const isHealing = pokemon.getAbility().id === Abilities.POISON_HEAL || pokemon.getPassive().id === Abilities.POISON_HEAL; // Added check for both Ability and the new Passives
|
||||||
|
|
||||||
switch (pokemon.status.effect) {
|
switch (pokemon.status.effect) {
|
||||||
case StatusEffect.POISON:
|
case StatusEffect.POISON:
|
||||||
@ -2772,7 +2772,7 @@ export class PostTurnStatusEffectPhase extends PokemonPhase {
|
|||||||
// Toxic damage increases over time, Poison does not
|
// Toxic damage increases over time, Poison does not
|
||||||
netEffect = (pokemon.status.effect === StatusEffect.TOXIC) ?
|
netEffect = (pokemon.status.effect === StatusEffect.TOXIC) ?
|
||||||
Math.max(Math.floor((pokemon.getMaxHp() / 16) * pokemon.status.turnCount), 1) : // Applies if Toxic
|
Math.max(Math.floor((pokemon.getMaxHp() / 16) * pokemon.status.turnCount), 1) : // Applies if Toxic
|
||||||
Math.max(pokemon.getMaxHp() >> 3, 1); // Damage logic for Poison otherwise
|
Math.max(pokemon.getMaxHp() >> 3, 1); // Damage logic for Poison otherwise
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case StatusEffect.BURN:
|
case StatusEffect.BURN:
|
||||||
|
Loading…
Reference in New Issue
Block a user