The Greatest Game Dev To Have Ever Lived

This commit is contained in:
reisenlol 2026-01-26 01:06:40 -08:00
parent fada3af715
commit 00e65ff31f
No known key found for this signature in database
16 changed files with 398 additions and 37 deletions

View file

@ -0,0 +1,32 @@
using UnityEngine;
public class HealAbility : ClassAbility
{
private PlayerEntity thisPlayer;
[SerializeField] private float healingAmount;
[SerializeField] private int suppliesMax;
public int currentSupplies;
public override void TryAbility()
{
if (currentSupplies > 0)
{
currentSupplies--;
AbilityEffects();
}
}
protected override void AbilityEffects()
{
HealPlayer();
}
public void HealPlayer()
{
PlayerEntity closestPlayer = thisPlayer.GetAdjacentPlayers();
if (closestPlayer)
{
closestPlayer.Heal(healingAmount); //insane code, i know.
}
}
}