Many more tests and fixes
All checks were successful
Build / Build (push) Successful in 3m12s

This commit is contained in:
2026-08-27 17:11:12 +02:00
parent 32b3ef9c4a
commit d2a82b5fe3
204 changed files with 20255 additions and 242 deletions

View File

@@ -6,11 +6,13 @@ public class InfestationEffect : Script, IScriptOnEndTurn, IScriptPreventSelfSwi
{
private readonly IPokemon _owner;
private int _turns;
private readonly float _bindDamage;
public InfestationEffect(IPokemon owner, int turns)
public InfestationEffect(IPokemon owner, int turns, float bindDamage)
{
_owner = owner;
_turns = turns;
_bindDamage = bindDamage;
}
/// <inheritdoc />
@@ -22,8 +24,8 @@ public class InfestationEffect : Script, IScriptOnEndTurn, IScriptPreventSelfSwi
/// <inheritdoc />
public void OnEndTurn(IScriptSource owner, IBattle battle)
{
var damage = _owner.BoostedStats.Hp / 8;
_owner.Damage(damage, DamageSource.Misc);
var damage = _owner.BoostedStats.Hp * _bindDamage;
_owner.Damage((uint)damage, DamageSource.Misc);
_turns--;
if (_turns <= 0)
@@ -35,6 +37,6 @@ public class InfestationEffect : Script, IScriptOnEndTurn, IScriptPreventSelfSwi
/// <inheritdoc />
public void ExpectedEndOfTurnDamage(IPokemon pokemon, ref int damage)
{
damage += (int)(_owner.MaxHealth / 8f);
damage += (int)(_owner.MaxHealth * _bindDamage);
}
}