Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit a4c3a0f

Browse files
committed
Default self-heal to return 50% of wound's burst damage instead of elaborate square root shit
1 parent e82bde0 commit a4c3a0f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Data/Base.rte/Actors/Shared/Scripts/SelfHeal.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
--Self-healing script complete with animations, for AHuman use only
22
function Create(self)
33
self.baseHealDelay = 500;
4+
self.woundDamageReturnRate = 0.5;
45
self.PieMenu:AddPieSlice(CreatePieSlice("Self Heal"), self);
56
self.healCrossParticle = CreateMOSParticle("Particle Heal Effect", "Base.rte");
67
end
@@ -11,11 +12,7 @@ function Update(self)
1112
if self.healing.wound then
1213
if self.healing.timer:IsPastSimMS(self.healing.delay) then
1314
self.healing.timer:Reset();
14-
if self.healing.part.DamageMultiplier > 1 then
15-
self.Health = math.min(self.Health + self.healing.wound.BurstDamage * math.sqrt(self.healing.part.DamageMultiplier), self.MaxHealth);
16-
else
17-
self.Health = math.min(self.Health + self.healing.wound.BurstDamage * self.healing.part.DamageMultiplier, self.MaxHealth);
18-
end
15+
self.Health = math.min(self.Health + self.healing.wound.BurstDamage * self.healing.part.DamageMultiplier * self.woundDamageReturnRate, self.MaxHealth);
1916
self.healing.wound.ToDelete = true;
2017
self.healing.wound = nil;
2118
for wound in self.healing.part.Wounds do

0 commit comments

Comments
 (0)