make loot tech aware + implement celt and gaul hero auras

This was SVN commit r14247.
This commit is contained in:
sanderd17 2013-11-29 12:13:37 +00:00
parent ca9944b09c
commit d672c6cf7d
14 changed files with 86 additions and 9 deletions

View File

@ -20,7 +20,12 @@ Looter.prototype.Collect = function(targetEntity)
cmpPromotion.IncreaseXp(xp);
}
var cmpPlayer = QueryOwnerInterface(this.entity, IID_Player);
cmpPlayer.AddResources(cmpLoot.GetResources());
var resources = cmpLoot.GetResources();
for (var type in resources)
{
resources[type] = ApplyValueModificationsToEntity("Looter/Resource/"+type, resources[type], this.entity);
}
cmpPlayer.AddResources(resources);
// If target entity has trader component, add carried goods to loot too
var cmpTrader = Engine.QueryInterface(targetEntity, IID_Trader);

View File

@ -0,0 +1,5 @@
{
"affects":["Cavalry"],
"affectedPlayers":["Player"],
"modifications":[{"value":"Attack/Charge/Hack","add":5}]
}

View File

@ -0,0 +1,5 @@
{
"affects":["Worker"],
"affectedPlayers":["Player"],
"modifications":[{"value":"ResourceGatherer/BaseSpeed","multiply":1.15}]
}

View File

@ -0,0 +1,5 @@
{
"affects":["Unit"],
"affectedPlayers":["Player"],
"modifications":[{"value":"Looter/Resource/metal","add":5}]
}

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_cavalry_spearman">
<Auras>
<cav_charge_attack_5>
<Type>range</Type>
<Radius>60</Radius>
</cav_charge_attack_5>
</Auras>
<Identity>
<Civ>cart</Civ>
<GenericName>Maharbal</GenericName>
@ -7,7 +13,7 @@
<History>Maharbal was Hannibal Barca's "brash young cavalry commander" during the 2nd Punic War. He is credited with turning the wing of the legions at Cannae resulting in defeat in which 30,000 of 50,000 Romans were lost, as well as significant contributions to the winning of many other battles during the 2nd Punic War. He is known for having said, after the battle of Cannae, "Hannibal, you know how to win the victory; just not what to do with it."</History>
<Icon>units/cart_hero_maharbal.png</Icon>
<Tooltip>Classes: Hero Melee Cavalry Spear.
"Commander" Aura: +50% Cavalry charge attack within vision range of him.
"Commander" Aura: +5 Cavalry charge attack within vision range of him.
Counters: 2x vs. Swordsmen and Siege Weapons, 1.5x vs. Skirmishers.
Countered by: Spearmen, Archers, and Elephants.</Tooltip>
</Identity>

View File

@ -1,5 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_cavalry_javelinist">
<Auras>
<champion_speed_25>
<Type>global</Type>
</champion_speed_25>
<champion_attack_5>
<Type>global</Type>
</champion_attack_5>
</Auras>
<Cost>
<Population>4</Population>
<BuildTime>50</BuildTime>
@ -17,7 +25,7 @@
<Civ>celt</Civ>
<Classes datatype="tokens">Chariot</Classes>
<SpecificName>Boudicca</SpecificName>
<Tooltip>Hero Aura: Increased Attack and Speed for Champion Units.</Tooltip>
<Tooltip>Hero Aura: +5 Attack and +25% Speed for Champion Units.</Tooltip>
<History>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.</History>
<Icon>units/celt_hero_boudicca.png</Icon>
</Identity>

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_infantry_swordsman">
<Auras>
<unit_loot_5metal>
<Type>global</Type>
</unit_loot_5metal>
</Auras>
<Armour>
<Hack>9</Hack>
</Armour>

View File

@ -1,12 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_infantry_spearman">
<Auras>
<unit_gatheringRate_15>
<Type>global</Type>
</unit_gatheringRate_15>
</Auras>
<Armour>
<Hack>9</Hack>
</Armour>
<Identity>
<Civ>celt</Civ>
<SpecificName>Britomartus</SpecificName>
<Tooltip>Hero Aura: Gathering rates increased during his lifetime.</Tooltip>
<Tooltip>Hero Aura: Gathering rates increased with +15% during his lifetime.</Tooltip>
<History> The story of how Marcus Claudius Marcellus killed a Gallic leader at Clastidium (222 BC) is typical of such encounters. Advancing with a smallish army, Marcellus met a combined force of Insubrian Gauls and Gaesatae at Clastidium. The Gallic army advanced with the usual rush and terrifying cries, and their king, Britomartus, picking out Marcellus by means of his badges of rank, made for him, shouting a challenge and brandishing his spear. Britomartus was an outstanding figure not only for his size but also for his adornments; for he was resplendent in bright colors and his armor shone with gold and silver. This armor, thought Marcellus, would be a fitting offering to the gods. He charged the Gaul, pierced his bright breastplate and cast him to the ground. It was an easy task to kill Britomartus and strip him of his armor.</History>
<Icon>units/celt_hero_britomartus.png</Icon>
</Identity>

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_infantry_swordsman">
<Auras>
<unit_speed_15>
<Type>global</Type>
</unit_speed_15>
</Auras>
<Attack>
<Melee>
<Hack>27.0</Hack>
@ -11,7 +16,7 @@
<Identity>
<Civ>celt</Civ>
<SpecificName>Caratacos</SpecificName>
<Tooltip>Hero Aura: Increased Speed for all units during his lifetime.</Tooltip>
<Tooltip>Hero Aura: +15% Speed for all units during his lifetime.</Tooltip>
<History>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.</History>
<Icon>units/celt_hero_caratacos.png</Icon>
</Identity>

View File

@ -1,9 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_cavalry_swordsman">
<Auras>
<heal>
<Type>range</Type>
<Radius>60</Radius>
</heal>
</Auras>
<Identity>
<Civ>celt</Civ>
<SpecificName>Cynvelin</SpecificName>
<Tooltip>Hero Aura: Has a large and powerful Healing Aura, only useful when idle.</Tooltip>
<Tooltip>Hero Aura: Has a large and powerful Healing Aura.</Tooltip>
<History>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.</History>
<Icon>units/celt_hero_cynvelin.png</Icon>
</Identity>

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_cavalry_swordsman">
<Auras>
<unit_attack_2>
<Type>range</Type>
<Radius>60</Radius>
<unit_attack_2>
<Auras>
<Attack>
<Melee>
<Hack>27.0</Hack>
@ -16,7 +22,7 @@
<Identity>
<Civ>celt</Civ>
<SpecificName>Vercingetorix</SpecificName>
<Tooltip>Hero Aura: Increased attack for all units within his aura.</Tooltip>
<Tooltip>Hero Aura: +2 attack for all units within his aura.</Tooltip>
<History>The most famous of all Celts, Vercingetorix lead the rebelling Gallic tribes against the might of Rome and Julius Caesar's veteran army in 54 BC. Although successful in defeating several Roman forces, Vercingetorix was unable to defeat Caesar, who eventually surrounded the Celtic leaders in the town of Alesia along with 100,000 men. When a relief army arrived to lift the epic siege, the Romans were out numbered 7 to 1 but still defeated the Celts. Vercingetorix surrendered and was executed.</History>
<Icon>units/celt_hero_vercingetorix.png</Icon>
</Identity>

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_infantry_swordsman">
<Auras>
<unit_loot_5metal>
<Type>global</Type>
</unit_loot_5metal>
</Auras>
<Armour>
<Hack>7</Hack>
</Armour>

View File

@ -1,12 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_infantry_spearman">
<Auras>
<unit_gatheringRate_15>
<Type>global</Type>
</unit_gatheringRate_15>
</Auras>
<Armour>
<Hack>9</Hack>
</Armour>
<Identity>
<Civ>gaul</Civ>
<SpecificName>Britomartus</SpecificName>
<Tooltip>Hero Aura: Gathering rates increased during his lifetime.</Tooltip>
<Tooltip>Hero Aura: Gathering rates increased with 15% during his lifetime.</Tooltip>
<History> The story of how Marcus Claudius Marcellus killed a Gallic leader at Clastidium (222 BC) is typical of such encounters. Advancing with a smallish army, Marcellus met a combined force of Insubrian Gauls and Gaesatae at Clastidium. The Gallic army advanced with the usual rush and terrifying cries, and their king, Britomartus, picking out Marcellus by means of his badges of rank, made for him, shouting a challenge and brandishing his spear. Britomartus was an outstanding figure not only for his size but also for his adornments; for he was resplendent in bright colors and his armor shone with gold and silver. This armor, thought Marcellus, would be a fitting offering to the gods. He charged the Gaul, pierced his bright breastplate and cast him to the ground. It was an easy task to kill Britomartus and strip him of his armor.</History>
<Icon>units/celt_hero_britomartus.png</Icon>
</Identity>

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_hero_cavalry_swordsman">
<Auras>
<unit_attack_2>
<Type>range</Type>
<Radius>60</Radius>
<unit_attack_2>
<Auras>
<Attack>
<Melee>
<Hack>27.0</Hack>
@ -16,7 +22,7 @@
<Identity>
<Civ>gaul</Civ>
<SpecificName>Vercingetorix</SpecificName>
<Tooltip>Hero Aura: Increased attack for all units within his aura.</Tooltip>
<Tooltip>Hero Aura: +2 attack for all units within his aura.</Tooltip>
<History>The most famous of all Celts, Vercingetorix lead the rebelling Gallic tribes against the might of Rome and Julius Caesar's veteran army in 54 BC. Although successful in defeating several Roman forces, Vercingetorix was unable to defeat Caesar, who eventually surrounded the Celtic leaders in the town of Alesia along with 100,000 men. When a relief army arrived to lift the epic siege, the Romans were out numbered 7 to 1 but still defeated the Celts. Vercingetorix surrendered and was executed.</History>
<Icon>units/celt_hero_vercingetorix.png</Icon>
</Identity>