Deukhoofd 232b94b04c
All checks were successful
Build / Build (push) Successful in 49s
More abilities
2025-06-01 11:23:46 +02:00

15 lines
452 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
[Script(ScriptCategory.Ability, "cheek_pouch")]
public class CheekPouch : Script
{
/// <inheritdoc />
public override void OnAfterItemConsume(IPokemon pokemon, IItem item)
{
if (item.Category == ItemCategory.Berry)
{
pokemon.BattleData?.Battle.EventHook.Invoke(new AbilityTriggerEvent(pokemon));
pokemon.Heal(pokemon.MaxHealth / 3);
}
}
}