Index: ps/trunk/binaries/data/mods/public/globalscripts/Templates.js =================================================================== --- ps/trunk/binaries/data/mods/public/globalscripts/Templates.js +++ ps/trunk/binaries/data/mods/public/globalscripts/Templates.js @@ -323,9 +323,9 @@ if (template.Heal) ret.heal = { - "hp": getEntityValue("Heal/HP"), + "health": getEntityValue("Heal/Health"), "range": getEntityValue("Heal/Range"), - "rate": getEntityValue("Heal/Rate") + "interval": getEntityValue("Heal/Interval") }; if (template.ResourceGatherer) Index: ps/trunk/binaries/data/mods/public/gui/common/tooltips.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/common/tooltips.js +++ ps/trunk/binaries/data/mods/public/gui/common/tooltips.js @@ -826,26 +826,25 @@ if (!template.heal) return ""; - let hp = +(template.heal.hp.toFixed(1)); + let health = +(template.heal.health.toFixed(1)); let range = +(template.heal.range.toFixed(0)); - let rate = +((template.heal.rate / 1000).toFixed(1)); + let interval = +((template.heal.interval / 1000).toFixed(1)); return [ - sprintf(translatePlural("%(label)s %(val)s %(unit)s", "%(label)s %(val)s %(unit)s", hp), { + sprintf(translatePlural("%(label)s %(val)s %(unit)s", "%(label)s %(val)s %(unit)s", health), { "label": headerFont(translate("Heal:")), - "val": hp, - // Translation: Short for hit points (or health points) that are healed in one healing action - "unit": unitFont(translatePlural("HP", "HP", hp)) + "val": health, + "unit": unitFont(translate("Health")) }), sprintf(translatePlural("%(label)s %(val)s %(unit)s", "%(label)s %(val)s %(unit)s", range), { "label": headerFont(translate("Range:")), "val": range, "unit": unitFont(translatePlural("meter", "meters", range)) }), - sprintf(translatePlural("%(label)s %(val)s %(unit)s", "%(label)s %(val)s %(unit)s", rate), { - "label": headerFont(translate("Rate:")), - "val": rate, - "unit": unitFont(translatePlural("second", "seconds", rate)) + sprintf(translatePlural("%(label)s %(val)s %(unit)s", "%(label)s %(val)s %(unit)s", interval), { + "label": headerFont(translate("Interval:")), + "val": interval, + "unit": unitFont(translatePlural("second", "seconds", interval)) }) ].join(translate(", ")); } Index: ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js +++ ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js @@ -501,9 +501,9 @@ let cmpHeal = Engine.QueryInterface(ent, IID_Heal); if (cmpHeal) ret.heal = { - "hp": cmpHeal.GetHP(), + "health": cmpHeal.GetHealth(), "range": cmpHeal.GetRange().max, - "rate": cmpHeal.GetRate(), + "interval": cmpHeal.GetInterval(), "unhealableClasses": cmpHeal.GetUnhealableClasses(), "healableClasses": cmpHeal.GetHealableClasses() }; Index: ps/trunk/binaries/data/mods/public/simulation/components/Heal.js =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/components/Heal.js +++ ps/trunk/binaries/data/mods/public/simulation/components/Heal.js @@ -9,12 +9,12 @@ "heal_overlay_range_mask.png" + "0.35" + "" + - "5" + - "2000" + + "5" + + "2000" + "Cavalry" + "Support Infantry" + "" + - "" + + "" + "" + "" + "" + @@ -26,19 +26,19 @@ "" + "" + "" + - "" + + "" + "" + "" + - "" + + "" + "" + "" + - "" + + "" + "" + "tokens" + "" + "" + "" + - "" + + "" + "" + "tokens" + "" + @@ -49,24 +49,25 @@ { }; -Heal.prototype.Serialize = null; // we have no dynamic state to save +// We have no dynamic state to save. +Heal.prototype.Serialize = null; Heal.prototype.GetTimers = function() { return { "prepare": 1000, - "repeat": this.GetRate() + "repeat": this.GetInterval() }; }; -Heal.prototype.GetHP = function() +Heal.prototype.GetHealth = function() { - return ApplyValueModificationsToEntity("Heal/HP", +this.template.HP, this.entity); + return ApplyValueModificationsToEntity("Heal/Health", +this.template.Health, this.entity); }; -Heal.prototype.GetRate = function() +Heal.prototype.GetInterval = function() { - return ApplyValueModificationsToEntity("Heal/Rate", +this.template.Rate, this.entity); + return ApplyValueModificationsToEntity("Heal/Interval", +this.template.Interval, this.entity); }; Heal.prototype.GetRange = function() @@ -138,14 +139,14 @@ if (!cmpHealth) return; - let targetState = cmpHealth.Increase(this.GetHP()); + let targetState = cmpHealth.Increase(this.GetHealth()); - // Add XP + // Add experience. let cmpLoot = Engine.QueryInterface(target, IID_Loot); let cmpPromotion = Engine.QueryInterface(this.entity, IID_Promotion); if (targetState !== undefined && cmpLoot && cmpPromotion) { - // HP healed * XP per HP + // Health healed times experience per health. cmpPromotion.IncreaseXp((targetState.new - targetState.old) / cmpHealth.GetMaxHitpoints() * cmpLoot.GetXp()); } // TODO we need a sound file Index: ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Heal.js =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Heal.js +++ ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Heal.js @@ -19,8 +19,8 @@ "LineTextureMask": "heal_overlay_range_mask.png", "LineThickness": 0.35 }, - "HP": 5, - "Rate": 2000, + "Health": 5, + "Interval": 2000, "UnhealableClasses": { "_string": "Cavalry" }, "HealableClasses": { "_string": "Support Infantry" }, }; @@ -47,9 +47,9 @@ return stat; switch (value) { - case "Heal/HP": + case "Heal/Health": return stat + 100; - case "Heal/Rate": + case "Heal/Interval": return stat + 200; case "Heal/Range": return stat + 300; @@ -61,11 +61,11 @@ let cmpHeal = ConstructComponent(60, "Heal", template); // Test Getters -TS_ASSERT_EQUALS(cmpHeal.GetRate(), 2000 + 200); +TS_ASSERT_EQUALS(cmpHeal.GetInterval(), 2000 + 200); TS_ASSERT_UNEVAL_EQUALS(cmpHeal.GetTimers(), { "prepare": 1000, "repeat": 2000 + 200 }); -TS_ASSERT_EQUALS(cmpHeal.GetHP(), 5 + 100); +TS_ASSERT_EQUALS(cmpHeal.GetHealth(), 5 + 100); TS_ASSERT_UNEVAL_EQUALS(cmpHeal.GetRange(), { "min": 0, "max": 20 + 300 }); @@ -134,7 +134,7 @@ } }); -cmpHeal.OnValueModification({ "component": "Heal", "valueNames": ["Heal/HP"] }); +cmpHeal.OnValueModification({ "component": "Heal", "valueNames": ["Heal/Health"] }); TS_ASSERT(!updated); cmpHeal.OnValueModification({ "component": "Heal", "valueNames": ["Heal/Range"] }); Index: ps/trunk/binaries/data/mods/public/simulation/data/technologies/heal_rate.json =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/data/technologies/heal_rate.json +++ ps/trunk/binaries/data/mods/public/simulation/data/technologies/heal_rate.json @@ -11,9 +11,9 @@ "requirementsTooltip": "Unlocked in Town Phase.", "icon": "healing_rate.png", "researchTime": 40, - "tooltip": "Healers +25% healing rate.", + "tooltip": "Healers −20% healing time.", "modifications": [ - { "value": "Heal/Rate", "multiply": 0.8 } + { "value": "Heal/Interval", "multiply": 0.8 } ], "affects": ["Healer"], "soundComplete": "interface/alarm/alarm_upgradearmory.xml" Index: ps/trunk/binaries/data/mods/public/simulation/data/technologies/heal_rate_2.json =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/data/technologies/heal_rate_2.json +++ ps/trunk/binaries/data/mods/public/simulation/data/technologies/heal_rate_2.json @@ -12,9 +12,9 @@ "requirementsTooltip": "Unlocked in City Phase.", "icon": "healing_rate.png", "researchTime": 40, - "tooltip": "Healers +25% healing rate.", + "tooltip": "Healers −20% healing time.", "modifications": [ - { "value": "Heal/Rate", "multiply": 0.8 } + { "value": "Heal/Interval", "multiply": 0.8 } ], "affects": ["Healer"], "soundComplete": "interface/alarm/alarm_upgradearmory.xml" Index: ps/trunk/binaries/data/mods/public/simulation/data/technologies/unit_advanced.json =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/data/technologies/unit_advanced.json +++ ps/trunk/binaries/data/mods/public/simulation/data/technologies/unit_advanced.json @@ -15,7 +15,7 @@ { "value": "Cost/BuildTime", "multiply": 1.2 }, { "value": "Health/Max", "multiply": 1.1 }, { "value": "Heal/Range", "add": 3, "affects": "Healer" }, - { "value": "Heal/HP", "add": 5, "affects": "Healer" }, + { "value": "Heal/Health", "add": 5, "affects": "Healer" }, { "value": "Loot/food", "multiply": 1.2 }, { "value": "Loot/wood", "multiply": 1.2 }, { "value": "Loot/stone", "multiply": 1.2 }, Index: ps/trunk/binaries/data/mods/public/simulation/data/technologies/unit_elite.json =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/data/technologies/unit_elite.json +++ ps/trunk/binaries/data/mods/public/simulation/data/technologies/unit_elite.json @@ -15,7 +15,7 @@ { "value": "Cost/BuildTime", "multiply": 1.2 }, { "value": "Health/Max", "multiply": 1.1 }, { "value": "Heal/Range", "add": 3, "affects": "Healer" }, - { "value": "Heal/HP", "add": 5, "affects": "Healer" }, + { "value": "Heal/Health", "add": 5, "affects": "Healer" }, { "value": "Loot/food", "multiply": 1.2 }, { "value": "Loot/wood", "multiply": 1.2 }, { "value": "Loot/stone", "multiply": 1.2 }, Index: ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_hero_healer.xml =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_hero_healer.xml +++ ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_hero_healer.xml @@ -15,15 +15,15 @@ 20 - 6 - 2000 - - Human heal_overlay_range.png heal_overlay_range_mask.png 0.35 + 6 + 2000 + + Human 1000 Index: ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_support_healer.xml =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_support_healer.xml +++ ps/trunk/binaries/data/mods/public/simulation/templates/template_unit_support_healer.xml @@ -7,15 +7,15 @@ 12 - 5 - 2000 - - Human heal_overlay_range.png heal_overlay_range_mask.png 0.35 + 5 + 2000 + + Human 85