2024-07-27 14:35:51 +00:00
|
|
|
using PkmnLib.Plugin.Gen7.Libraries;
|
2024-07-27 14:26:45 +00:00
|
|
|
|
2024-07-27 14:35:51 +00:00
|
|
|
namespace PkmnLib.Plugin.Gen7;
|
2024-07-27 14:26:45 +00:00
|
|
|
|
2024-08-23 09:15:53 +00:00
|
|
|
public class Gen7PluginConfiguration : PluginConfiguration
|
|
|
|
{
|
2024-09-30 17:23:56 +00:00
|
|
|
public bool DamageCalculatorHasRandomness { get; set; } = true;
|
2024-08-23 09:15:53 +00:00
|
|
|
}
|
|
|
|
|
2024-07-27 14:35:51 +00:00
|
|
|
public class Gen7Plugin : Dynamic.ScriptHandling.Registry.Plugin
|
2024-07-27 14:26:45 +00:00
|
|
|
{
|
2024-08-23 09:15:53 +00:00
|
|
|
private readonly Gen7PluginConfiguration _configuration;
|
2024-09-30 17:23:56 +00:00
|
|
|
|
|
|
|
public Gen7Plugin() : base()
|
|
|
|
{
|
|
|
|
_configuration = new Gen7PluginConfiguration();
|
|
|
|
}
|
2024-08-23 09:15:53 +00:00
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public Gen7Plugin(PluginConfiguration configuration) : base(configuration)
|
|
|
|
{
|
|
|
|
_configuration = (Gen7PluginConfiguration)configuration;
|
|
|
|
}
|
|
|
|
|
2024-07-27 14:26:45 +00:00
|
|
|
/// <inheritdoc />
|
|
|
|
public override string Name => "Gen7";
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public override uint LoadOrder => 0;
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public override void Register(ScriptRegistry registry)
|
|
|
|
{
|
|
|
|
registry.RegisterAssemblyScripts(typeof(Gen7Plugin).Assembly);
|
|
|
|
registry.RegisterBattleStatCalculator(new Gen7BattleStatCalculator());
|
2024-08-23 09:15:53 +00:00
|
|
|
registry.RegisterDamageCalculator(new Gen7DamageCalculator(_configuration.DamageCalculatorHasRandomness));
|
2024-07-27 14:26:45 +00:00
|
|
|
registry.RegisterMiscLibrary(new Gen7MiscLibrary());
|
2025-01-10 10:58:23 +00:00
|
|
|
registry.RegisterCaptureLibrary(new Gen7CaptureLibrary());
|
2024-07-27 14:26:45 +00:00
|
|
|
}
|
|
|
|
}
|