namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon; [Script(ScriptCategory.Pokemon, "leech_seed")] public class LeechSeedEffect : Script, IScriptOnEndTurn, IAIInfoScriptExpectedEndOfTurnDamage { private readonly IBattlePokemon _owner; private readonly IBattlePokemon _placer; public LeechSeedEffect(IBattlePokemon owner, IBattlePokemon placer) { _owner = owner; _placer = placer; } /// public void OnEndTurn(IScriptSource owner, IBattle battle) { var damage = _owner.MaxHealth / 8; if (_owner.CurrentHealth <= damage) damage = _owner.CurrentHealth; _owner.Damage(damage, DamageSource.Misc); if (_owner.ActiveAbility?.Name == AbilityNames.LiquidOoze) _placer.Damage(damage, DamageSource.Misc); else _placer.Heal(damage); } /// public void ExpectedEndOfTurnDamage(IBattlePokemon pokemon, ref int damage) { damage += (int)(_owner.MaxHealth / 8f); } }