15 lines
452 B
C#
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);
|
|
}
|
|
}
|
|
} |