diff --git a/binaries/data/mods/public/simulation/components/Auras.js b/binaries/data/mods/public/simulation/components/Auras.js index 2b6c63cf70..644c3f87a9 100644 --- a/binaries/data/mods/public/simulation/components/Auras.js +++ b/binaries/data/mods/public/simulation/components/Auras.js @@ -155,11 +155,9 @@ Auras.prototype.Clean = function() if (!affectedPlayers.length) continue; - if (this.IsGlobalAura(name)) - this.ApplyTemplateBonus(name, affectedPlayers); - if (!this.IsRangeAura(name)) continue; + this[name].rangeQuery = cmpRangeManager.CreateActiveQuery( this.entity, 0, @@ -169,8 +167,14 @@ Auras.prototype.Clean = function() cmpRangeManager.GetEntityFlagMask("normal") ); cmpRangeManager.EnableActiveQuery(this[name].rangeQuery); - // Add self to your own query for consistency with templates. - this.OnRangeUpdate({"tag":this[name].rangeQuery, "added":[this.entity], "removed":[]}); + + if (this.IsGlobalAura(name)) + { + // update stats in for all templates + this.ApplyTemplateBonus(name, affectedPlayers); + // Add self to your own query for consistency with templates. + this.OnRangeUpdate({"tag":this[name].rangeQuery, "added":[this.entity], "removed":[]}); + } } }; diff --git a/binaries/data/mods/public/simulation/components/Health.js b/binaries/data/mods/public/simulation/components/Health.js index 63996c7eb4..23a87f3b2b 100644 --- a/binaries/data/mods/public/simulation/components/Health.js +++ b/binaries/data/mods/public/simulation/components/Health.js @@ -44,7 +44,7 @@ Health.prototype.Init = function() // Default to , but use if it's undefined or zero // (Allowing 0 initial HP would break our death detection code) this.hitpoints = +(this.template.Initial || this.GetMaxHitpoints()); - this.regenRate = +this.template.RegenRate; + this.regenRate = ApplyValueModificationsToEntity("Health/RegenRate", +this.template.RegenRate, this.entity); this.CheckRegenTimer(); }; @@ -131,7 +131,7 @@ Health.prototype.CheckRegenTimer = function() return; } - // we need a timer, enable is one doesn't exist + // we need a timer, enable if one doesn't exist if (this.regenTimer) return; @@ -344,9 +344,6 @@ Health.prototype.OnValueModification = function(msg) var oldRegenRate = this.regenRate; this.regenRate = ApplyValueModificationsToEntity("Health/RegenRate", +this.template.RegenRate, this.entity); - if (this.IsUnhealable()) - this.regenRate = Math.min(0,this.regenRate); - if (this.regenRate != oldRegenRate) this.CheckRegenTimer(); }; diff --git a/binaries/data/mods/public/simulation/data/auras/champion_attack_5.json b/binaries/data/mods/public/simulation/data/auras/champion_attack_5.json new file mode 100644 index 0000000000..d94c477d1d --- /dev/null +++ b/binaries/data/mods/public/simulation/data/auras/champion_attack_5.json @@ -0,0 +1,5 @@ +{ + "affects":["Champion"], + "affectedPlayers":["Player"], + "modifications":[{"value":"Attack/Ranged/Pierce","add":5},{"value":"Attack/Melee/Hack","add":5}] +} diff --git a/binaries/data/mods/public/simulation/data/auras/champion_speed_25.json b/binaries/data/mods/public/simulation/data/auras/champion_speed_25.json new file mode 100644 index 0000000000..ed3054938e --- /dev/null +++ b/binaries/data/mods/public/simulation/data/auras/champion_speed_25.json @@ -0,0 +1,5 @@ +{ + "affects":["Champion"], + "affectedPlayers":["Player"], + "modifications":[{"value":"UnitMotion/WalkSpeed","multiply":1.25}] +} diff --git a/binaries/data/mods/public/simulation/data/auras/ship_speed.json b/binaries/data/mods/public/simulation/data/auras/ship_speed.json deleted file mode 100644 index 196863dd32..0000000000 --- a/binaries/data/mods/public/simulation/data/auras/ship_speed.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "affects":["Ship"], - "affectedPlayers":["Player","MutualAlly"], - "modifications":[{"value":"UnitMotion/WalkSpeed","multiply":1.5}] -} diff --git a/binaries/data/mods/public/simulation/data/auras/unit_attack_2.json b/binaries/data/mods/public/simulation/data/auras/unit_attack_2.json new file mode 100644 index 0000000000..e2d25b3d45 --- /dev/null +++ b/binaries/data/mods/public/simulation/data/auras/unit_attack_2.json @@ -0,0 +1,5 @@ +{ + "affects":["Unit"], + "affectedPlayers":["Ally"], + "modifications":[{"value":"Attack/Ranged/Pierce","add":2},{"value":"Attack/Melee/Hack","add":2}] +} diff --git a/binaries/data/mods/public/simulation/templates/units/brit_hero_boudicca.xml b/binaries/data/mods/public/simulation/templates/units/brit_hero_boudicca.xml index 3db80d9eee..aeaf88cfb4 100644 --- a/binaries/data/mods/public/simulation/templates/units/brit_hero_boudicca.xml +++ b/binaries/data/mods/public/simulation/templates/units/brit_hero_boudicca.xml @@ -1,5 +1,13 @@ + + + global + + + global + + 7 7 @@ -22,7 +30,7 @@ brit Chariot Boudicca - Hero Aura: Increased Attack and Speed for Champion Units. + Hero Aura: +5 Attack and +25% Speed for Champion Units. Ammianus Marcellinus described how difficult it would be for a band of foreigners to deal with a Celt if he called in the help of his wife. For she was stronger than he was and could rain blows and kicks upon the assailants equal in force to the shots of a catapult. Boudicca, queen of the Iceni, was said to be 'very tall and terrifying in appearance; her voice was very harsh and a great mass of red hair fell over her shoulders. She wore a tunic of many colors over which a thick cloak was fastened by a brooch. units/celt_hero_boudicca.png diff --git a/binaries/data/mods/public/simulation/templates/units/brit_hero_boudicca_sword.xml b/binaries/data/mods/public/simulation/templates/units/brit_hero_boudicca_sword.xml index 8acf2ea553..038ab871d3 100644 --- a/binaries/data/mods/public/simulation/templates/units/brit_hero_boudicca_sword.xml +++ b/binaries/data/mods/public/simulation/templates/units/brit_hero_boudicca_sword.xml @@ -1,5 +1,13 @@ + + + global + + + global + + 5 6 @@ -9,7 +17,7 @@ brit Boudicca Heroine - Hero Aura: TBD. + Hero Aura: +5 Attack and +25% Speed for Champion units. . units/celt_hero_boudicca.png diff --git a/binaries/data/mods/public/simulation/templates/units/brit_hero_caratacos.xml b/binaries/data/mods/public/simulation/templates/units/brit_hero_caratacos.xml index d6df50ef05..119a97f48e 100644 --- a/binaries/data/mods/public/simulation/templates/units/brit_hero_caratacos.xml +++ b/binaries/data/mods/public/simulation/templates/units/brit_hero_caratacos.xml @@ -1,5 +1,10 @@ + + + global + + 6 6 @@ -16,7 +21,7 @@ brit Caratacos - Hero Aura: Increased Speed for all units during his lifetime. + Hero Aura: +15% Speed for all units during his lifetime. Caratacos's name is better known in its Romanized form, Caratacus. Under this name he is remembered as a fierce defender of Britain against the Romans after their invasion in 43 AD. Son of King Cynvelin of the Catuvellauni tribe, Caratacos fought for nine years against the Romans with little success, eventually fleeing to the tribes in Wales, where he was defeated decisively. Finally he entered Northern Britain, where was handed over to the Romans. Taken to Rome, Caratacos was allowed to live by the Emperor Claudius and died in Italy. units/celt_hero_caratacos.png diff --git a/binaries/data/mods/public/simulation/templates/units/brit_hero_cynvelin.xml b/binaries/data/mods/public/simulation/templates/units/brit_hero_cynvelin.xml index 6d12de3152..b416af3dc9 100644 --- a/binaries/data/mods/public/simulation/templates/units/brit_hero_cynvelin.xml +++ b/binaries/data/mods/public/simulation/templates/units/brit_hero_cynvelin.xml @@ -1,12 +1,18 @@ + + + range + 60 + + 10 brit Cynvelin - Hero Aura: Has a large and powerful Healing Aura, only useful when idle. + Hero Aura: Has a large and powerful Healing Aura. Cynvelin was a powerful ruler centered in the territory around modern day London. Ruling the Catuvellauni from Camulodunum, he was a warrior king who conquered a neighboring tribe and was referred to by the Romans as the King of the Britons. Eventually Cynvelin retired to become the arch-druid of Siluria, but was taken to Rome with his son upon Caratacos's capture. According to legend, the Apostle Paul baptized Cynvelin into Christianity before he died in Italy. units/celt_hero_cynvelin.png diff --git a/binaries/data/mods/public/simulation/templates/units/cart_hero_hamilcar.xml b/binaries/data/mods/public/simulation/templates/units/cart_hero_hamilcar.xml index 8234761a95..69be4cd7a1 100644 --- a/binaries/data/mods/public/simulation/templates/units/cart_hero_hamilcar.xml +++ b/binaries/data/mods/public/simulation/templates/units/cart_hero_hamilcar.xml @@ -1,5 +1,10 @@ + + + global + + cart Ḥimelqart Baraq diff --git a/binaries/data/mods/public/simulation/templates/units/cart_hero_hannibal.xml b/binaries/data/mods/public/simulation/templates/units/cart_hero_hannibal.xml index 006eb8142e..fa7783f842 100644 --- a/binaries/data/mods/public/simulation/templates/units/cart_hero_hannibal.xml +++ b/binaries/data/mods/public/simulation/templates/units/cart_hero_hannibal.xml @@ -1,5 +1,11 @@ + + + range + 60 + + cart Hannibal Barca @@ -7,7 +13,7 @@ Carthage's most famous son. Hannibal Barca was the eldest son of Hamilcar Barca and proved an even greater commander than his father. Lived 247-182 BC. While he ultimately lost the Second Punic War, his victories at Trebia, Lake Trasimene, and Cannae, and the feat of crossing the Alps have secured his position as among the best tacticians and strategists in history. units/cart_hero_hannibal.png Classes: Hero Melee Elephant. -"Tactician" Aura: All allied units +15% attack within vision range of him. +"Tactician" Aura: All allied units +2 attack within vision range of him. "Strategist" Ability: The player can see changes within the fog of war while Hannibal lives. Counters: 2x vs. All Cavalry, 1.5x vs. All Structures. Extra 1.5x vs. Gates. Countered by: Skirmishers and Swordsmen. Can run amok.