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.Status;
|
||||
|
||||
[Script(ScriptCategory.Status, "poisoned")]
|
||||
public class Poisoned : Script, IScriptOnEndTurn
|
||||
public class Poisoned : Script, IScriptOnEndTurn, IAIInfoScriptExpectedEndOfTurnDamage
|
||||
{
|
||||
private IPokemon? _pokemon;
|
||||
|
||||
@@ -46,4 +46,11 @@ public class Poisoned : Script, IScriptOnEndTurn
|
||||
else
|
||||
_pokemon.Damage(damage, DamageSource.Status, eventBatchId);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void ExpectedEndOfTurnDamage(IPokemon pokemon, ref int damage)
|
||||
{
|
||||
if (_pokemon != null)
|
||||
damage += (int)(_pokemon.MaxHealth * GetPoisonMultiplier());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user