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:
@@ -3,7 +3,7 @@ using PkmnLib.Static.Moves;
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Status;
|
||||
|
||||
[Script(ScriptCategory.Status, "burned")]
|
||||
public class Burned : Script, IScriptChangeMoveDamage, IScriptOnEndTurn
|
||||
public class Burned : Script, IScriptChangeMoveDamage, IScriptOnEndTurn, IAIInfoScriptExpectedEndOfTurnDamage
|
||||
{
|
||||
private IPokemon? _target;
|
||||
|
||||
@@ -41,4 +41,11 @@ public class Burned : Script, IScriptChangeMoveDamage, IScriptOnEndTurn
|
||||
});
|
||||
_target.Damage(damage, DamageSource.Status, eventBatch);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ExpectedEndOfTurnDamage(IPokemon pokemon, ref int damage)
|
||||
{
|
||||
if (_target != null)
|
||||
damage += (int)(_target.MaxHealth / 16f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user