Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -26,7 +26,7 @@ public class Gen7BattleStatCalculator : IBattleStatCalculator
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void CalculateBoostedStats(IPokemon pokemon, StatisticSet<uint> stats)
|
||||
public void CalculateBoostedStats(IBattlePokemon pokemon, StatisticSet<uint> stats)
|
||||
{
|
||||
stats.SetStatistic(Statistic.Hp, CalculateBoostedStat(pokemon, Statistic.Hp));
|
||||
stats.SetStatistic(Statistic.Attack, CalculateBoostedStat(pokemon, Statistic.Attack));
|
||||
@@ -37,7 +37,7 @@ public class Gen7BattleStatCalculator : IBattleStatCalculator
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public uint CalculateBoostedStat(IPokemon pokemon, Statistic stat)
|
||||
public uint CalculateBoostedStat(IBattlePokemon pokemon, Statistic stat)
|
||||
{
|
||||
var flatStat = CalculateFlatStat(pokemon, stat);
|
||||
var boostModifier = GetStatBoostModifier(pokemon.StatBoost.GetStatistic(stat));
|
||||
@@ -48,7 +48,7 @@ public class Gen7BattleStatCalculator : IBattleStatCalculator
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public byte CalculateModifiedAccuracy(IExecutingMove executingMove, IPokemon target, byte hitIndex,
|
||||
public byte CalculateModifiedAccuracy(IExecutingMove executingMove, IBattlePokemon target, byte hitIndex,
|
||||
byte moveAccuracy)
|
||||
{
|
||||
var accuracyModifier = 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user