Adds more move scripts

This commit is contained in:
2025-03-07 12:07:57 +01:00
parent a3a9f1800a
commit 3571b2130e
16 changed files with 193 additions and 21 deletions

View File

@@ -0,0 +1,27 @@
using PkmnLib.Static;
using PkmnLib.Static.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "gear_up")]
public class GearUp : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var battleData = move.User.BattleData;
if (battleData == null)
return;
var side = battleData.Battle.Sides[battleData.SideIndex];
EventBatchId evtBatchId = new();
foreach (var pokemon in side.Pokemon.WhereNotNull())
{
var ability = pokemon.ActiveAbility?.Name;
if (ability != "plus" && ability != "minus")
continue;
pokemon.ChangeStatBoost(Statistic.Attack, 1, pokemon == move.User, evtBatchId);
pokemon.ChangeStatBoost(Statistic.SpecialAttack, 1, pokemon == move.User, evtBatchId);
}
}
}