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:
@@ -14,12 +14,12 @@ public class Gen7PluginConfiguration : IPluginConfiguration
|
||||
/// This should be set to true for most cases, as it simulates the actual damage calculation in the games. Only
|
||||
/// set to false for testing purposes.
|
||||
/// </summary>
|
||||
public bool DamageCalculatorHasRandomness { get; init; } = true;
|
||||
public bool DamageCalculatorHasRandomness { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// The number of times a species has been caught. This is used for critical capture calculations.
|
||||
/// </summary>
|
||||
public Func<ISpecies, int> TimesSpeciesCaught { get; init; } = _ => 0;
|
||||
public Func<ISpecies, int> TimesSpeciesCaught { get; set; } = _ => 0;
|
||||
}
|
||||
|
||||
public class Gen7Plugin : Plugin<Gen7PluginConfiguration>, IResourceProvider
|
||||
@@ -44,7 +44,7 @@ public class Gen7Plugin : Plugin<Gen7PluginConfiguration>, IResourceProvider
|
||||
{
|
||||
registry.RegisterAssemblyScripts(typeof(Gen7Plugin).Assembly);
|
||||
registry.RegisterBattleStatCalculator(new Gen7BattleStatCalculator());
|
||||
registry.RegisterDamageCalculator(new Gen7DamageCalculator(Configuration.DamageCalculatorHasRandomness));
|
||||
registry.RegisterDamageCalculator(new Gen7DamageCalculator(Configuration));
|
||||
registry.RegisterMiscLibrary(new Gen7MiscLibrary());
|
||||
registry.RegisterCaptureLibrary(new Gen7CaptureLibrary(Configuration));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user