Even more abilities
All checks were successful
Build / Build (push) Successful in 51s

This commit is contained in:
2025-06-14 13:21:23 +02:00
parent 4b07f36176
commit 5961bb746e
31 changed files with 787 additions and 157 deletions

View File

@@ -0,0 +1,21 @@
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// Sap Sipper is an ability that grants immunity to Grass-type moves and raises Attack when hit by one.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Sap_Sipper_(Ability)">Bulbapedia - Sap Sipper</see>
/// </summary>
[Script(ScriptCategory.Ability, "sap_sipper")]
public class SapSipper : Script
{
/// <inheritdoc />
public override void IsInvulnerableToMove(IExecutingMove move, IPokemon target, ref bool invulnerable)
{
if (move.GetHitData(target, 0).Type?.Name == "grass")
{
invulnerable = true;
move.Battle.EventHook.Invoke(new AbilityTriggerEvent(target));
target.ChangeStatBoost(Statistic.Attack, 1, true, false);
}
}
}