Implements 11 more moves

This commit is contained in:
2025-03-07 11:50:59 +01:00
parent 61a69eecb8
commit a3a9f1800a
17 changed files with 311 additions and 13 deletions

View File

@@ -0,0 +1,26 @@
using System.Linq;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "fusion_bolt")]
public class FusionBolt : Script
{
/// <inheritdoc />
public override void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier)
{
var battleData = target.BattleData;
if (battleData == null)
return;
// Grab the choices for the current turn, that have been executed before this move.
var choice = battleData.Battle.PreviousTurnChoices.Last().TakeWhile(x => x != move.MoveChoice)
// Of these, find the move choice that used Fusion Flare.
.OfType<MoveChoice>().FirstOrDefault(x => x.ChosenMove.MoveData.Name == "fusion_flare");
// If Fusion Flare was used, Fusion Bolt's power is doubled.
if (choice != null)
{
modifier *= 2;
}
}
}