Promotions that do more damage versus promotions

Elmdor

Chieftain
Joined
Aug 23, 2011
Messages
8
As the title suggests, I'm wondering if there is a way to make a promotion that increases combat strength versus specifically promoted units. Not unit types, (UNITCOMBAT_X), but depending on if the unit has the promotion. An example:

Unit X has the promotion Drill 1. Unit Y has the promotion IncreasedDamagetoDrill, which adds 20% versus Units with Drill 1.

Is this possible?
 
Not in XML. This can easily be done through Lua, inside the RunCombatSim (start of combat) and EndCombatSim (end of combat) events, by changing the base strength of the units as needed; in my own mod I already have several things like this. The usual disclaimers apply:
> The AI will have no idea about this, and will base its decision on whether to attack or not on the unit's stats sans this ability.
> Most Lua events have inherent limitations, and these two are no different: can't use Quick Combat, can't use Strategic View, and if one of the two combatants is a city then it won't have any information about WHICH city.
> You can change the base strength of a unit, but you can't change the base RANGED strength, so if the unit's going to use a ranged attack, you'd have to decrease the opponent's strength instead of increasing your own.
 
Thanks for the quick reply! Are there any tutorials or, barring that, references to making lua events for Civ5?
 
The best way is to find mods that do similar things, steal some code, and play til you grasp the basics.
 
Back
Top Bottom