Deukhoofd 1b9d137bb0
All checks were successful
Build / Build (push) Successful in 50s
Surprisingly, more abilities
2025-06-14 13:37:58 +02:00

22 lines
743 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// Soul-Heart is an ability that raises Special Attack when another Pokémon faints.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Soul-Heart_(Ability)">Bulbapedia - Soul-Heart</see>
/// </summary>
[Script(ScriptCategory.Ability, "soul_heart")]
public class SoulHeart : Script
{
/// <inheritdoc />
public override void OnAllyFaint(IPokemon ally, IPokemon faintedPokemon)
{
ally.ChangeStatBoost(Statistic.SpecialAttack, 1, true, false);
}
/// <inheritdoc />
public override void OnOpponentFaints(IExecutingMove move, IPokemon target, byte hit)
{
move.User.ChangeStatBoost(Statistic.SpecialAttack, 1, true, false);
}
}