Further work on the script interface rework
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "grudge")]
|
||||
public class GrudgeEffect : Script, IScriptOnIncomingHit
|
||||
public class GrudgeEffect : Script, IScriptOnIncomingHit, IScriptOnFaint
|
||||
{
|
||||
private ILearnedMove? _lastMove;
|
||||
|
||||
@@ -12,7 +12,7 @@ public class GrudgeEffect : Script, IScriptOnIncomingHit
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnFaint(IPokemon pokemon, DamageSource source)
|
||||
public void OnFaint(IPokemon pokemon, DamageSource source)
|
||||
{
|
||||
if (_lastMove != null && source == DamageSource.MoveDamage)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user