[Spears] Help/Question

Quick question about a niche for spears, is it possible to add to spear holding units a counterattack and damage multiplier for units specifically on mounts using the improved unit tags that Heavenfall created?

5,521 views 13 replies
Reply #1 Top

Ok I'm just shooting out an idea here since no one else has serenaded so far.

I do not have much experience with the <calculate> tag  but the extra damage might work with a on meleespell that sets the passed tp the defensible damage tag as unit damage + bonus * target_unit_is_mounted

as well you might get lucky by introducing a unit stat  cavalry_counter and then on defend  use a prereq on the calculated value of  Unit_cavalry_counter * target_is_mounted and setting  Unit_cavalry_counter = 0 for 1 round

 

this is just a rough idea I had while your question was lingering in the corner of my mind. If you succeed in implementing it please come back and tell us about your struggle. I would like to learn from it :)

Reply #2 Top

Using the unitstat background lib you can make un-mounted spearmen deal extra damage against mounted units. I don't know about counter-attack against them, you'll have to try that one out.

I wouldn't recommend Sargittar's solution, instead just use

         <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_UnitStat_Attack_Pierce</StrVal>
                <StrVal2>UnitStat_BG_IsUsingMount</StrVal2>
                <Multiplier>1.3</Multiplier>
                <vsHigher>1</vsHigher>
            </GameModifier>

for a 30% boost to pierce damage for example

Reply #3 Top

What about a damage revenge for attacking a spear holder with a mounted unit?

So will only do damage to someone that attacks it only if its a mounted unit.  This might be more what I am going for, though I do like the idea of having them do naturally more damage to mounted units I want a revenge damage for mounted units and originally only thought of counterattack but maybe a damage shield effect only for mounted the tag.

Reply #4 Top

Since we're speaking about spears, is there anything that is resistant to spears? Be it a monster or armor type, anything. Are spears bad vs anything?

Reply #5 Top

Quoting halmal242, reply 3
What about a damage revenge for attacking a spear holder with a mounted unit?

So will only do damage to someone that attacks it only if its a mounted unit.  This might be more what I am going for, though I do like the idea of having them do naturally more damage to mounted units I want a revenge damage for mounted units and originally only thought of counterattack but maybe a damage shield effect only for mounted the tag.
End of halmal242's quote

You'll have to test the counter-attack thing. It could work, or maybe it doesn't. Don't know - counter-attack is handled a bit differently because it needs to save how many has been done each round.

Reply #6 Top

I will code this in and try it out next week after break has kicked in, have one more paper to write for this semester.

Reply #7 Top

Alright I decided to mess around with this a bit tonight and for some reason its not working the way I wanted to.

I started with a base off of the cloak of thorns spell as its what I actually wanted not what I originally stated, sorry for the horrible clarity.

Code: xml
  1. &lt;GameModifier&gt;
  2. &lt;ModType&gt;Unit&lt;/ModType&gt;
  3. &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  4. &lt;StrVal&gt;UnitStat_DamageReflect&lt;/StrVal&gt;
  5. &lt;StrVal2&gt;UnitStat_BG_IsUsingMount&lt;/StrVal2&gt;
  6. &lt;Value&gt;2.0&lt;/Value&gt;
  7. &lt;Provides&gt;200% Damage Reflection against mounted units&lt;/Provides&gt;
  8. &lt;vsUnitType&gt;1&lt;/vsUnitType&gt;
  9. &lt;/GameModifier&gt;

Does this look right?

Reply #8 Top

The idea is that Pike is deadly against mounted units for revenge damage.  So if you attack pike with a mounted unit you might kill it but you are almost certainly going to die whereas infantry can engage them without fear other than their long sharp pointy things.

Reply #9 Top

Not vsunittype, vsHigher. It's a dynamic unitstat, not <creaturetype>

 

Also note that it won't function if the pike unit is mounted.

Reply #10 Top

That is actually as intended as lances didn't really do much more damage to other mounted as they did to everyone else.  I t was the pike in the ground that did the extreme damage to mounted when they charged into them.

So the final one would look like this?

Code: xml
  1. &lt;GameModifier&gt;
  2. &lt;ModType&gt;Unit&lt;/ModType&gt;
  3. &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  4. &lt;StrVal&gt;UnitStat_DamageReflect&lt;/StrVal&gt;
  5. &lt;StrVal2&gt;UnitStat_BG_IsUsingMount&lt;/StrVal2&gt;
  6. &lt;Value&gt;2.0&lt;/Value&gt;
  7. &lt;Provides&gt;200% Damage Reflection against mounted units&lt;/Provides&gt;
  8. &lt;vsHigher&gt;1&lt;/vsHigher&gt;
  9. &lt;/GameModifier&gt;

Reply #11 Top

If the damagereflect and the value are right, I don't know that unitstat.

Reply #12 Top

Its from the cloak of thorns spell.

Reply #13 Top

i have mod in the works that add alot of "new" weapons (copy and pasted hero weapons with different stats) .. i have cavalry only weapons like lances and cavalry sword that do bonus vs unmounted ... and i have spear do less armor ignore (like 34%), instead they have like +4 atk vs mounted and like +10 crit vs mounted, theres different amounts as u advance techs... and i have special spears unlocked at war colleges that let the unit do ability : spear wall ... the unit takes defense stance (like skips turn) but gains +3 counterattacks and +3 atk vs mounted for 3 turns (the weapon already has like +4 atk vs mounted, +16 crit vs mounted, +7 accuracy vs mounted (12 base damage) ) ... but thats just at war colleges, weapons of war will have higher stats, and new tech "college drills" will have another...

there will be some special anti cavalry weapons like that, because i added a tech after war colleges "cavalry tactics" which adds warhorse that give different abilitys ... harrassers warhorse has abilitys that make enemy skip a turn, or have less move range, and like berserker warhorse berserks, and defender warhorse can make ur army flee, but have the cav unit lose health... and tactical warhorse has ability to attack all adjacent enemies, for like 70% normal damage...

...

and much more....  coming soon heheh