Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper

This commit is contained in:
2026-08-28 15:20:26 +02:00
parent 942be8eaeb
commit 8a2733a0a9
859 changed files with 4408 additions and 5331 deletions

View File

@@ -19,7 +19,7 @@ public static class CustomTriggers
public static readonly StringKey IgnoreHail = "ignores_hail";
public record IgnoreHailArgs(IPokemon Pokemon) : ICustomTriggerArgs
public record IgnoreHailArgs(IBattlePokemon Pokemon) : ICustomTriggerArgs
{
public bool Ignore { get; set; } = false;
}
@@ -47,8 +47,12 @@ public static class CustomTriggers
public static readonly StringKey Whirlpool = "whirlpool";
public record WhirlpoolArgs(IExecutingMove Move, IPokemon Target, byte HitIndex, int Turns, float DamagePercent)
: ICustomTriggerArgs
public record WhirlpoolArgs(
IExecutingMove Move,
IBattlePokemon Target,
byte HitIndex,
int Turns,
float DamagePercent) : ICustomTriggerArgs
{
public int Turns { get; set; } = Turns;
public float DamagePercent { get; set; } = DamagePercent;
@@ -56,7 +60,7 @@ public static class CustomTriggers
public static readonly StringKey ModifyAuraEffect = "modify_aura_effect";
public record ModifyAuraEffectArgs(IExecutingMove Move, IPokemon Target, byte HitIndex, float AuraEffect)
public record ModifyAuraEffectArgs(IExecutingMove Move, IBattlePokemon Target, byte HitIndex, float AuraEffect)
: ICustomTriggerArgs
{
public float AuraEffect { get; set; } = AuraEffect;
@@ -71,14 +75,14 @@ public static class CustomTriggers
public static readonly StringKey ModifySleepTurns = "modify_sleep_turns";
public record ModifySleepTurnsArgs(IPokemon Pokemon, int Turns) : ICustomTriggerArgs
public record ModifySleepTurnsArgs(IBattlePokemon Pokemon, int Turns) : ICustomTriggerArgs
{
public int Turns { get; set; } = Turns;
}
public static readonly StringKey BypassProtection = "bypass_protection";
public record BypassProtectionArgs(IExecutingMove Move, IPokemon Target, byte HitIndex, bool Bypass)
public record BypassProtectionArgs(IExecutingMove Move, IBattlePokemon Target, byte HitIndex, bool Bypass)
: ICustomTriggerArgs
{
public bool Bypass { get; set; } = Bypass;
@@ -86,7 +90,7 @@ public static class CustomTriggers
public static readonly StringKey BypassSubstitute = "bypass_subsitute";
public record BypassSubstituteArgs(IExecutingMove Move, IPokemon Target, byte HitIndex, bool Bypass)
public record BypassSubstituteArgs(IExecutingMove Move, IBattlePokemon Target, byte HitIndex, bool Bypass)
: ICustomTriggerArgs
{
public bool Bypass { get; set; } = Bypass;
@@ -94,8 +98,13 @@ public static class CustomTriggers
public static readonly StringKey ModifyDrain = "modify_drain";
public record ModifyDrainArgs(IExecutingMove Move, IPokemon Target, byte Hit, uint Damage, uint Healed, bool Invert)
: ICustomTriggerArgs
public record ModifyDrainArgs(
IExecutingMove Move,
IBattlePokemon Target,
byte Hit,
uint Damage,
uint Healed,
bool Invert) : ICustomTriggerArgs
{
public uint Healed { get; set; } = Healed;
public bool Invert { get; set; } = Invert;
@@ -103,7 +112,7 @@ public static class CustomTriggers
public static readonly StringKey ModifyHealPercent = "modify_heal_percent";
public record ModifyHealPercentArgs(IExecutingMove Move, IPokemon Target, byte Hit, float HealPercent)
public record ModifyHealPercentArgs(IExecutingMove Move, IBattlePokemon Target, byte Hit, float HealPercent)
: ICustomTriggerArgs
{
public float HealPercent { get; set; } = HealPercent;
@@ -111,7 +120,7 @@ public static class CustomTriggers
public static readonly StringKey PoisonedDamage = "poisoned_damage";
public record PoisonedDamageArgs(IPokemon Pokemon, uint Damage) : ICustomTriggerArgs
public record PoisonedDamageArgs(IBattlePokemon Pokemon, uint Damage) : ICustomTriggerArgs
{
public uint Damage { get; set; } = Damage;
public bool Invert { get; set; } = false;
@@ -119,7 +128,7 @@ public static class CustomTriggers
public static readonly StringKey ModifyRecoil = "modify_recoil";
public record ModifyRecoilArgs(IExecutingMove Move, IPokemon Target, byte Hit, uint Damage, uint Recoil)
public record ModifyRecoilArgs(IExecutingMove Move, IBattlePokemon Target, byte Hit, uint Damage, uint Recoil)
: ICustomTriggerArgs
{
public uint Recoil { get; set; } = Recoil;
@@ -142,7 +151,7 @@ public static class CustomTriggers
public static readonly StringKey BypassSandstormDamage = "bypass_sandstorm_damage";
public record BypassSandstormDamageArgs(IPokemon Pokemon) : ICustomTriggerArgs
public record BypassSandstormDamageArgs(IBattlePokemon Pokemon) : ICustomTriggerArgs
{
public bool Bypass { get; set; } = false;
}