24 lines
646 B
C#
24 lines
646 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
[Script(ScriptCategory.Pokemon, "ghostcurse")]
|
|
public class GhostCurseEffect : Script, IScriptOnEndTurn, IAIInfoScriptExpectedEndOfTurnDamage
|
|
{
|
|
private IPokemon _pokemon;
|
|
|
|
public GhostCurseEffect(IPokemon pokemon)
|
|
{
|
|
_pokemon = pokemon;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void OnEndTurn(IScriptSource owner, IBattle battle)
|
|
{
|
|
_pokemon.Damage(_pokemon.CurrentHealth / 4, DamageSource.Misc);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void ExpectedEndOfTurnDamage(IPokemon pokemon, ref int damage)
|
|
{
|
|
damage += (int)(_pokemon.CurrentHealth / 4f);
|
|
}
|
|
} |