Further work on refactor to interface based scripts
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "heal_percent")]
|
||||
public class HealPercent : Script, IScriptOnInitialize
|
||||
public class HealPercent : Script, IScriptOnInitialize, IScriptOnSecondaryEffect
|
||||
{
|
||||
private float _healPercent = 0.5f;
|
||||
|
||||
@@ -15,7 +15,7 @@ public class HealPercent : Script, IScriptOnInitialize
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var args = new CustomTriggers.ModifyHealPercentArgs(move, target, hit, _healPercent);
|
||||
move.RunScriptHook(x => x.CustomTrigger(CustomTriggers.ModifyHealPercent, args));
|
||||
|
||||
Reference in New Issue
Block a user