This commit is contained in:
@@ -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 />
|
||||
|
||||
@@ -557,7 +557,7 @@ public abstract class Script : IDeepCloneable
|
||||
/// This function is triggered on a Pokemon and its parents when the given Pokemon consumes the
|
||||
/// held item it had.
|
||||
/// </summary>
|
||||
public virtual void OnAfterHeldItemConsume(IPokemon pokemon, IItem item)
|
||||
public virtual void OnAfterItemConsume(IPokemon pokemon, IItem item)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user