Getting started with implementing an explicit AI, based on the Essentials one.
All checks were successful
Build / Build (push) Successful in 1m2s
All checks were successful
Build / Build (push) Successful in 1m2s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "ghostcurse")]
|
||||
public class GhostCurseEffect : Script, IScriptOnEndTurn
|
||||
public class GhostCurseEffect : Script, IScriptOnEndTurn, IAIInfoScriptExpectedEndOfTurnDamage
|
||||
{
|
||||
private IPokemon _pokemon;
|
||||
|
||||
@@ -15,4 +15,10 @@ public class GhostCurseEffect : Script, IScriptOnEndTurn
|
||||
{
|
||||
_pokemon.Damage(_pokemon.CurrentHealth / 4, DamageSource.Misc);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ExpectedEndOfTurnDamage(IPokemon pokemon, ref int damage)
|
||||
{
|
||||
damage += (int)(_pokemon.CurrentHealth / 4f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user