Well... it wasn't what I SAID I was going to do earlier this weekend, but it WAS the next thing on my list (which I'm sorry I haven't kept very well updated online either...)
Updates
- Buildings Damage Units on Attacking the city mechanism
This comprises three new tags for buildings that are designed to use in tandem or none are all that beneficial. The three tags are as follows:
- MayDamageAttackingUnitCombatTypes: List under this tag the UnitCombatTypes that the building will potentially damage when they attack the city. The tag, when programmed is as follows:
Code:
<MayDamageAttackingUnitCombatTypes>
<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
</MayDamageAttackingUnitCombatTypes>
Basically, this is the primary indicator that this building will potentially cause damage to an enemy unit (of the specified type(s)) that attacks the city with this building active in it. The damage, if inflicted, will take place at the very beginning of combat. The only shortsight on this is that the odds are not influenced by this possibility. I had some ideas as to how to tweak the odds and show it in the combat attack help hover but I figured Koshling might be able to see how that should be done far better than myself. And I kinda like the 'hidden' or potentially surprising aspect of this effect myself. Perhaps next weekend I can update the combat odds section for this effect.
- iDamageAttackerChance: The percentage chance the unit with the indicated CC(s) that attacks the city will be damaged. This is modified by the Attacking Unit's Dodge modifier when that starts coming into play more. Thus, units with a higher dodge value have a better chance to avoid this damage when attacking the city.
- iDamageToAttacker: The percentage of the total HP that will be inflicted upon the Attacker when the building successfully deals damage to him. This is modified by the Attacker's Armor value for when that starts coming into play more. The armor value directly reduces this damage.
This is to help us expand on our earlier discussions regarding city defenses, which I put up front on my plate just to get it all taken care of before moving on too far past that discussion. We'd talked about automated defense systems, murder holes, boiling oil etc and this is the result. It's been tested and works pretty cool. It now awaits Hydro and Nimek and others to more fully flesh out in use.
@Koshling, while I did not influence the combat odds in this effect, I DID develop tag AI for the buildings that would use them.