More abilities
All checks were successful
Build / Build (push) Successful in 49s

This commit is contained in:
2025-06-01 11:23:01 +02:00
parent b090aa65f9
commit 232b94b04c
8 changed files with 114 additions and 17 deletions

View File

@@ -263,6 +263,11 @@ public interface IPokemon : IScriptSource, IDeepCloneable
/// </summary>
bool ConsumeHeldItem();
/// <summary>
/// Uses an item on the Pokemon.
/// </summary>
void UseItem(IItem item);
/// <summary>
/// Change a boosted stat by a certain amount.
/// </summary>
@@ -805,8 +810,15 @@ public class PokemonImpl : ScriptSource, IPokemon
BattleData.MarkItemAsConsumed(HeldItem);
}
UseItem(SetHeldItem(null)!);
return true;
}
public void UseItem(IItem item)
{
// TODO: actually consume the item
throw new NotImplementedException();
this.RunScriptHook(x => x.OnAfterItemConsume(this, item));
}
/// <inheritdoc />