Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -21,15 +21,16 @@ public interface IBattleStatCalculator
|
||||
/// <summary>
|
||||
/// Calculate all the boosted stats of a Pokemon, including stat boosts.
|
||||
/// </summary>
|
||||
void CalculateBoostedStats(IPokemon pokemon, StatisticSet<uint> stats);
|
||||
void CalculateBoostedStats(IBattlePokemon pokemon, StatisticSet<uint> stats);
|
||||
|
||||
/// <summary>
|
||||
/// Calculate a single boosted stat of a Pokemon, including stat boosts.
|
||||
/// </summary>
|
||||
uint CalculateBoostedStat(IPokemon pokemon, Statistic stat);
|
||||
uint CalculateBoostedStat(IBattlePokemon pokemon, Statistic stat);
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the accuracy for a move, taking into account any accuracy modifiers.
|
||||
/// </summary>
|
||||
byte CalculateModifiedAccuracy(IExecutingMove executingMove, IPokemon target, byte hitIndex, byte moveAccuracy);
|
||||
byte CalculateModifiedAccuracy(IExecutingMove executingMove, IBattlePokemon target, byte hitIndex,
|
||||
byte moveAccuracy);
|
||||
}
|
||||
@@ -46,5 +46,5 @@ public interface ICaptureLibrary
|
||||
/// <summary>
|
||||
/// Attempts to capture a Pokémon using a specified item (e.g., Poké Ball).
|
||||
/// </summary>
|
||||
CaptureResult TryCapture(IPokemon target, IItem captureItem, IBattleRandom random);
|
||||
CaptureResult TryCapture(IBattlePokemon target, IItem captureItem, IBattleRandom random);
|
||||
}
|
||||
@@ -11,16 +11,16 @@ public interface IDamageCalculator
|
||||
/// <summary>
|
||||
/// Calculate the damage for a given hit on a Pokemon.
|
||||
/// </summary>
|
||||
uint GetDamage(IExecutingMove? executingMove, MoveCategory category, IPokemon user, IPokemon target,
|
||||
uint GetDamage(IExecutingMove? executingMove, MoveCategory category, IBattlePokemon user, IBattlePokemon target,
|
||||
int targetCount, byte hitNumber, IHitData hitData);
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the base power for a given hit on a Pokemon.
|
||||
/// </summary>
|
||||
ushort GetBasePower(IExecutingMove executingMove, IPokemon target, byte hitNumber, IHitData hitData);
|
||||
ushort GetBasePower(IExecutingMove executingMove, IBattlePokemon target, byte hitNumber, IHitData hitData);
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether a specified hit should be critical or not.
|
||||
/// </summary>
|
||||
bool IsCritical(IBattle battle, IExecutingMove executingMove, IPokemon target, byte hitNumber);
|
||||
bool IsCritical(IBattle battle, IExecutingMove executingMove, IBattlePokemon target, byte hitNumber);
|
||||
}
|
||||
@@ -13,7 +13,7 @@ public interface IMiscLibrary
|
||||
/// Returns the choice that's used when a Pokemon is unable to make the move choice it wants to, or when it has no
|
||||
/// moves left, yet wants to make a move.
|
||||
/// </summary>
|
||||
ITurnChoice ReplacementChoice(IPokemon user, byte targetSide, byte targetPosition);
|
||||
ITurnChoice ReplacementChoice(IBattlePokemon user, byte targetSide, byte targetPosition);
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether the given choice is the choice that is used when the user is unable to make a move choice.
|
||||
|
||||
Reference in New Issue
Block a user