Finish script interface refactor
All checks were successful
Build / Build (push) Successful in 1m1s

This commit is contained in:
2025-07-06 10:27:56 +02:00
parent 83f6a183e3
commit 7c270a6d52
117 changed files with 669 additions and 648 deletions

View File

@@ -3,13 +3,14 @@ using PkmnLib.Static.Moves;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "present")]
public class Present : Script, IScriptOnSecondaryEffect, IScriptChangeBasePower
public class Present : Script, IScriptOnSecondaryEffect, IScriptChangeBasePower, IScriptChangeCategory,
IScriptOnBeforeHit
{
private bool _isHealing;
private byte _basePower;
/// <inheritdoc />
public override void OnBeforeHit(IExecutingMove move, IPokemon target, byte hitIndex)
public void OnBeforeHit(IExecutingMove move, IPokemon target, byte hitIndex)
{
var battleRandom = move.User.BattleData?.Battle.Random;
if (battleRandom == null)
@@ -33,7 +34,7 @@ public class Present : Script, IScriptOnSecondaryEffect, IScriptChangeBasePower
}
/// <inheritdoc />
public override void ChangeCategory(IExecutingMove move, IPokemon target, byte hitIndex, ref MoveCategory category)
public void ChangeCategory(IExecutingMove move, IPokemon target, byte hitIndex, ref MoveCategory category)
{
if (_isHealing)
category = MoveCategory.Status;