mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Updated getStatusEffectActivationText with placeholder function
This commit is contained in:
parent
aa0a88a468
commit
ebe1e1dc47
@ -51,19 +51,26 @@ export function getStatusEffectObtainText(statusEffect: StatusEffect, sourceText
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getStatusEffectActivationText(statusEffect: StatusEffect): string {
|
export function getStatusEffectActivationText(statusEffect: StatusEffect, pokemon: Pokemon): string {
|
||||||
switch (statusEffect) {
|
switch (statusEffect) {
|
||||||
case StatusEffect.POISON:
|
case StatusEffect.POISON:
|
||||||
case StatusEffect.TOXIC:
|
case StatusEffect.TOXIC:
|
||||||
return ' is hurt\nby poison!';
|
// Placeholder, idk how to fix this, too new to typeScript, but it functions as normal anyway because of the pokemon && clause always returning the else value
|
||||||
|
if (pokemon && pokemon.getAbility().id === Abilities.POISON_HEAL) {
|
||||||
|
console.log("Poison Heal ability detected");
|
||||||
|
return ' had its HP restored!';
|
||||||
|
} else {
|
||||||
|
console.log("No Poison Heal ability detected");
|
||||||
|
return ' is hurt by poison!';
|
||||||
|
}
|
||||||
case StatusEffect.PARALYSIS:
|
case StatusEffect.PARALYSIS:
|
||||||
return ' is paralyzed!\nIt can\'t move!';
|
return ' is paralyzed! It can\'t move!';
|
||||||
case StatusEffect.SLEEP:
|
case StatusEffect.SLEEP:
|
||||||
return ' is fast asleep.';
|
return ' is fast asleep.';
|
||||||
case StatusEffect.FREEZE:
|
case StatusEffect.FREEZE:
|
||||||
return ' is\nfrozen solid!';
|
return ' is frozen solid!';
|
||||||
case StatusEffect.BURN:
|
case StatusEffect.BURN:
|
||||||
return ' is hurt\nby its burn!';
|
return ' is hurt by its burn!';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
@ -134,4 +141,4 @@ export function getStatusEffectCatchRateMultiplier(statusEffect: StatusEffect):
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user