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