Files
PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/GhostCurseEffect.cs
Deukhoofd 6a82c20cf2
All checks were successful
Build / Build (push) Successful in 1m57s
More tests, more fixes
2026-07-05 18:26:55 +02:00

24 lines
638 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.MaxHealth / 4, DamageSource.Misc);
}
/// <inheritdoc />
public void ExpectedEndOfTurnDamage(IPokemon pokemon, ref int damage)
{
damage += (int)(_pokemon.MaxHealth / 4f);
}
}