More moves
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "leech_seed")]
|
||||
public class LeechSeedEffect : Script
|
||||
{
|
||||
private readonly IPokemon _owner;
|
||||
private readonly IPokemon _placer;
|
||||
|
||||
public LeechSeedEffect(IPokemon owner, IPokemon placer)
|
||||
{
|
||||
_owner = owner;
|
||||
_placer = placer;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnEndTurn(IBattle battle)
|
||||
{
|
||||
var damage = _owner.BoostedStats.Hp / 8;
|
||||
if (_owner.CurrentHealth <= damage)
|
||||
damage = _owner.CurrentHealth;
|
||||
|
||||
_owner.Damage(damage, DamageSource.Misc);
|
||||
if (_owner.ActiveAbility?.Name == "liquid_ooze")
|
||||
_placer.Damage(damage, DamageSource.Misc);
|
||||
else
|
||||
_placer.Heal(damage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user