Adds optional way to set damage randomness on or off on individual integration tests.
All checks were successful
Build / Build (push) Successful in 49s
All checks were successful
Build / Build (push) Successful in 49s
This commit is contained in:
@@ -3,7 +3,7 @@ using PkmnLib.Static.Moves;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Libraries.Battling;
|
||||
|
||||
public class Gen7DamageCalculator(bool hasRandomness) : IDamageCalculator
|
||||
public class Gen7DamageCalculator(Gen7PluginConfiguration configuration) : IDamageCalculator
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public uint GetDamage(IExecutingMove executingMove, IPokemon target, byte hitNumber, IHitData hitData)
|
||||
@@ -34,7 +34,7 @@ public class Gen7DamageCalculator(bool hasRandomness) : IDamageCalculator
|
||||
floatDamage = MathF.Floor(floatDamage * critModifier);
|
||||
}
|
||||
|
||||
if (hasRandomness)
|
||||
if (configuration.DamageCalculatorHasRandomness)
|
||||
{
|
||||
var battle = target.BattleData?.Battle;
|
||||
if (battle == null)
|
||||
|
||||
Reference in New Issue
Block a user