Implements several more moves

This commit is contained in:
2025-01-10 13:45:29 +01:00
parent 0ad692a921
commit ecdc9c7654
12 changed files with 206 additions and 16 deletions

View File

@@ -295,7 +295,7 @@ public interface IPokemon : IScriptSource, IDeepCloneable
/// <summary>
/// Damages the Pokemon by a certain amount of damage, from a damage source.
/// </summary>
void Damage(uint damage, DamageSource source, EventBatchId batchId);
void Damage(uint damage, DamageSource source, EventBatchId batchId = default);
/// <summary>
/// Heals the Pokemon by a specific amount. Unless allow_revive is set to true, this will not
@@ -389,6 +389,16 @@ public interface IPokemonBattleData : IDeepCloneable
/// Adds an opponent to the list of seen opponents.
/// </summary>
void MarkOpponentAsSeen(IPokemon opponent);
/// <summary>
/// A list of items the Pokémon has consumed this battle.
/// </summary>
IReadOnlyList<IItem> ConsumedItems { get; }
/// <summary>
/// Marks an item as consumed.
/// </summary>
void MarkItemAsConsumed(IItem itemName);
}
/// <inheritdoc cref="IPokemon"/>
@@ -1062,4 +1072,15 @@ public class PokemonBattleDataImpl : IPokemonBattleData
{
_seenOpponents.Add(opponent);
}
private readonly List<IItem> _consumedItems = [];
/// <inheritdoc />
public IReadOnlyList<IItem> ConsumedItems => _consumedItems;
/// <inheritdoc />
public void MarkItemAsConsumed(IItem itemName)
{
_consumedItems.Add(itemName);
}
}