More moves implemented

This commit is contained in:
2025-05-05 11:36:59 +02:00
parent 11ba3c73bb
commit 292c303fc0
39 changed files with 818 additions and 68 deletions

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using System.Linq;
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
using PkmnLib.Static.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "smack_down")]
public class SmackDown : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var battleData = target.BattleData;
if (battleData == null)
return;
target.Volatile.Add(new SmackDownEffect());
var chargeBounceEffect = ScriptUtils.ResolveName<ChargeBounceEffect>();
if (target.Volatile.Contains(chargeBounceEffect))
target.Volatile.Remove(chargeBounceEffect);
var flyEffect = ScriptUtils.ResolveName<ChargeFlyEffect>();
if (target.Volatile.Contains(flyEffect))
target.Volatile.Remove(flyEffect);
var skyDropEffect = ScriptUtils.ResolveName<ChargeSkyDropEffect>();
if (target.Volatile.Contains(skyDropEffect))
target.Volatile.Remove(skyDropEffect);
}
}