diff --git a/binaries/data/mods/public/simulation/components/Heal.js b/binaries/data/mods/public/simulation/components/Heal.js index 74b7568658..aefdceb454 100644 --- a/binaries/data/mods/public/simulation/components/Heal.js +++ b/binaries/data/mods/public/simulation/components/Heal.js @@ -39,14 +39,16 @@ Heal.prototype.Serialize = null; // we have no dynamic state to save Heal.prototype.GetTimers = function() { + var cmpTechMan = QueryOwnerInterface(this.entity, IID_TechnologyManager); var prepare = 1000; - var repeat = +this.template.Rate; + var repeat = cmpTechMan.ApplyModifications("Heal/Rate", this.template.Rate, this.entity); return { "prepare": prepare, "repeat": repeat }; }; Heal.prototype.GetRange = function() { - var max = +this.template.Range; + var cmpTechMan = QueryOwnerInterface(this.entity, IID_TechnologyManager); + var max = cmpTechMan.ApplyModifications("Heal/Range", this.template.Range, this.entity); var min = 0; return { "max": max, "min": min }; }; @@ -74,7 +76,9 @@ Heal.prototype.PerformHeal = function(target) var cmpHealth = Engine.QueryInterface(target, IID_Health); if (!cmpHealth) return; - var targetState = cmpHealth.Increase(Math.max(0,this.template.HP)); + + var cmpTechMan = QueryOwnerInterface(this.entity, IID_TechnologyManager); + var targetState = cmpHealth.Increase(cmpTechMan.ApplyModifications("Heal/HP", this.template.HP, this.entity)); // Add XP var cmpLoot = Engine.QueryInterface(target, IID_Loot);