Move OnInitialize to interface
This commit is contained in:
@@ -3,14 +3,13 @@ using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "heal_each_end_of_turn")]
|
||||
public class HealEachEndOfTurn : Script
|
||||
public class HealEachEndOfTurn : Script, IScriptOnInitialize
|
||||
{
|
||||
private float _healPercentage;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnInitialize(IReadOnlyDictionary<StringKey, object?>? parameters)
|
||||
public void OnInitialize(IReadOnlyDictionary<StringKey, object?>? parameters)
|
||||
{
|
||||
base.OnInitialize(parameters);
|
||||
if (parameters == null || !parameters.TryGetValue("percent", out var healPercentageObj) ||
|
||||
healPercentageObj is not float healPercentage)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user