This commit is contained in:
Rendo 2025-07-12 04:20:57 +05:00
commit 850d7629e5
5 changed files with 23 additions and 47 deletions

View file

@ -28,6 +28,7 @@ public partial class Entity : Node2D
{
EmitSignal(SignalName.OnHPChanged, amount, origin);
HP += amount;
if (HP > MaxHP) HP = MaxHP;
}
public virtual void KillByDamage()

View file

@ -36,7 +36,7 @@ public partial class AloeBehaviour : BaseBehaviour
var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * Utility.TileWidth;
if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData))
{
plantData.Heal(3000 + 25 * plantData.MaxHP, GetParent());
plantData.Heal(1200 + 0.5f * plantData.MaxHP, GetParent());
}
}