Fight rework premature merge #22

Merged
Jonathan merged 16 commits from feature/fight_rework into develop 2025-11-04 10:25:14 +01:00
Showing only changes of commit fef1bcc3b6 - Show all commits
+4 -3
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Babushka.scripts.CSharp.Common.Fight;
@@ -25,7 +26,7 @@ public static class FightUtils
public static bool IsAlive(this FightWorld.Fighter self)
{
return self.GetHealth() >= 0;
return self.GetHealth() > 0;
}
public static bool IsDead(this FightWorld.Fighter self)
@@ -35,7 +36,7 @@ public static class FightUtils
public static int GetHealth(this FightWorld.Fighter self)
{
return self.health ?? self.maxHealth;
return Math.Max(self.health ?? self.maxHealth, 0);
}
public static void AddHealth(this FightWorld.Fighter self, int addHealth)