Skip to content
Snippets Groups Projects
Commit bf6aba14 authored by Bill Clinton's avatar Bill Clinton
Browse files

Merge branch 'refactor/restore-health-orb' into 'main'

Refactor Restore Health Orb Logic

See merge request !50
parents 43e43e08 b0447f2f
Branches feat/cheats-and-orbs
Tags
1 merge request!50Refactor Restore Health Orb Logic
...@@ -20,7 +20,9 @@ public class RestoreHealthOrbs : Orbs ...@@ -20,7 +20,9 @@ public class RestoreHealthOrbs : Orbs
public override void ApplyOrbEffect() public override void ApplyOrbEffect()
{ {
playerHealth.currentHealth += 20; playerHealth.TakeDamage(-20); // Restore 20 HP
// Handle HP overflow
if (playerHealth.currentHealth > 100) if (playerHealth.currentHealth > 100)
{ {
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