More moves implemented

This commit is contained in:
2025-02-01 15:00:22 +01:00
parent 3a75493912
commit 00fe08dcd4
50 changed files with 1146 additions and 139 deletions

View File

@@ -0,0 +1,23 @@
using PkmnLib.Plugin.Gen7.Scripts.MoveVolatile;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "electrify")]
public class Electrify : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var choiceQueue = target.BattleData?.Battle.ChoiceQueue;
if (choiceQueue == null)
return;
if (choiceQueue.Where(x => x is IMoveChoice moveChoice && moveChoice.User == target) is not IMoveChoice choice)
{
move.GetHitData(target, hit).Fail();
return;
}
choice.Volatile.Add(new ElectrifyEffect());
}
}