Skip to content
Snippets Groups Projects
Commit b0447f2f authored by billc27's avatar billc27
Browse files

refactor: restore health orb logic

parent 599db756
Branches
1 merge request!50Refactor Restore Health Orb Logic
......@@ -20,7 +20,9 @@ public class RestoreHealthOrbs : Orbs
public override void ApplyOrbEffect()
{
playerHealth.currentHealth += 20;
playerHealth.TakeDamage(-20); // Restore 20 HP
// Handle HP overflow
if (playerHealth.currentHealth > 100)
{
playerHealth.currentHealth = 100;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment