Further work on refactor to interface based scripts
This commit is contained in:
@@ -7,12 +7,12 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Aftermath_(Ability)">Bulbapedia - Aftermath</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "aftermath")]
|
||||
public class Aftermath : Script
|
||||
public class Aftermath : Script, IScriptOnIncomingHit
|
||||
{
|
||||
private IExecutingMove? _lastAttack;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnIncomingHit(IExecutingMove move, IPokemon target, byte hit)
|
||||
public void OnIncomingHit(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
_lastAttack = !move.GetHitData(target, hit).IsContact ? move : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user