This commit is contained in:
@@ -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")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user