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

@@ -6,7 +6,8 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Weather;
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Harsh_sunlight">Bulbapedia - Harsh Sunlight</see>
/// </summary>
[Script(ScriptCategory.Weather, "harsh_sunlight")]
public class HarshSunlight : Script, ILimitedTurnsScript, IScriptChangeBasePower, IScriptOnEndTurn
public class HarshSunlight : Script, ILimitedTurnsScript, IScriptChangeBasePower, IScriptOnEndTurn,
IScriptPreventStatusChange, IScriptCustomTrigger, IScriptChangeAccuracy
{
private int? _duration;
@@ -45,7 +46,7 @@ public class HarshSunlight : Script, ILimitedTurnsScript, IScriptChangeBasePower
}
/// <inheritdoc />
public override void CustomTrigger(StringKey eventName, ICustomTriggerArgs args)
public void CustomTrigger(StringKey eventName, ICustomTriggerArgs args)
{
if (eventName != CustomTriggers.BypassChargeMove)
return;
@@ -58,8 +59,7 @@ public class HarshSunlight : Script, ILimitedTurnsScript, IScriptChangeBasePower
}
/// <inheritdoc />
public override void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted,
ref bool preventStatus)
public void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted, ref bool preventStatus)
{
if (status == ScriptUtils.ResolveName<Status.Frozen>())
{
@@ -68,8 +68,7 @@ public class HarshSunlight : Script, ILimitedTurnsScript, IScriptChangeBasePower
}
/// <inheritdoc />
public override void ChangeAccuracy(IExecutingMove executingMove, IPokemon target, byte hitIndex,
ref int modifiedAccuracy)
public void ChangeAccuracy(IExecutingMove executingMove, IPokemon target, byte hitIndex, ref int modifiedAccuracy)
{
if (executingMove.UseMove.Name == "thunder" || executingMove.UseMove.Name == "hurricane")
{