Many more tests and fixes
All checks were successful
Build / Build (push) Successful in 3m12s

This commit is contained in:
2026-08-27 17:11:12 +02:00
parent 32b3ef9c4a
commit d2a82b5fe3
204 changed files with 20255 additions and 242 deletions

View File

@@ -1,9 +1,10 @@
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
using PkmnLib.Plugin.Gen7.Scripts.Side;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "hyperspace_fury")]
public class HyperspaceFury : Script, IScriptOnSecondaryEffect
public class HyperspaceFury : Script, IScriptFailMove, IScriptOnSecondaryEffect
{
/// <inheritdoc />
public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
@@ -13,5 +14,21 @@ public class HyperspaceFury : Script, IScriptOnSecondaryEffect
{
target.Volatile.Remove(protectionScript.Name);
}
target.BattleData?.BattleSide.VolatileScripts.Remove(ScriptUtils.ResolveName<CraftyShieldEffect>());
target.BattleData?.BattleSide.VolatileScripts.Remove(ScriptUtils.ResolveName<MatBlockEffect>());
target.BattleData?.BattleSide.VolatileScripts.Remove(ScriptUtils.ResolveName<QuickGuardEffect>());
target.BattleData?.BattleSide.VolatileScripts.Remove(ScriptUtils.ResolveName<WideGuardEffect>());
move.User.ChangeStatBoost(Statistic.Defense, -1, true, false);
}
private static StringKey HoopaName = "hoopa";
private static StringKey UnboundName = "unbound";
public void FailMove(IExecutingMove move, ref bool fail)
{
if (move.User.Species.Name != HoopaName || move.User.Form.Name != UnboundName)
{
fail = true;
}
}
}