Refactor move classes to implement respective interfaces for better structure
All checks were successful
Build / Build (push) Successful in 52s
All checks were successful
Build / Build (push) Successful in 52s
This commit is contained in:
@@ -3,10 +3,10 @@ using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "focus_punch")]
|
||||
public class FocusPunch : Script
|
||||
public class FocusPunch : Script, IScriptOnBeforeTurnStart, IScriptPreventMove
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnBeforeTurnStart(ITurnChoice choice)
|
||||
public void OnBeforeTurnStart(ITurnChoice choice)
|
||||
{
|
||||
choice.User.Volatile.Add(new FocusPunchEffect());
|
||||
choice.User.BattleData?.Battle.EventHook.Invoke(new DialogEvent("focus_punch_charge",
|
||||
@@ -17,7 +17,7 @@ public class FocusPunch : Script
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventMove(IExecutingMove move, ref bool prevent)
|
||||
public void PreventMove(IExecutingMove move, ref bool prevent)
|
||||
{
|
||||
var focusPunchEffect = move.User.Volatile.Get<FocusPunchEffect>();
|
||||
if (focusPunchEffect == null || focusPunchEffect.WasHit)
|
||||
|
||||
Reference in New Issue
Block a user