1) All air spells that use shards or intelligence for calculating effects don't do it properly
Only in this school of magic, none of calculations for intelligence or shard boosts uses "CastingUnit" as ValueOwner. So, for example, if Lightning Strike is used against monster, no shard bonus would apply. And in case of enemy faction, their shard number will be used, not of the caster faction. Similar, intelligence of the target will be used, instead of the caster (this includes Haste too).
2) Burning Blade, Shield of Fire and Haste last indefinitely.
All tactical spells, with duration, share the bug where effect that has duration also lasts after battle. Usually, for as many turns as rounds that have left. In case of these spells, since duration is not set, it would lead to permanent duration.
Possible workaround: Add some duration. Haste is good with 3 rounds (its original 1.07 duration). And Burning Blade and Shield of Fire would be fine with 5 rounds (long enough to feel as whole battle without being too disruptive if effect stays after for a few rounds).
3) Heal doesn't work.
The reason why Heal doesn't work is because curative CurHealth effect is not compatible with min/max values used for random damage.
Possible workaround: Set heal to cure 6 points of damage (plus shard scaling)
4) Rallying Cry doesn't work.
Similarly to Heal, AdjustMorale doesn't work with min/max values.
Suggested fix: Change is to strait +15 point of morale (plus scaling)
5) Slow doesn't work
It appears that SetUnitStat modifier is non-functional
Workaround: Use AdjustUnitStat, and reduce current speed by (current speed -1) for same effect
6) Fear doesn't scale properly
There is typo in formula. Instead dividing Intelligence by -2, 2 is subtracted from it (missing /). So caster with Int of 15 would not reduce enemy morale by 20+15*0.5=27.5, but instead for just 20+(-15+2)=7.
7) Crush Spirit doesn't scale properly
Also typo in formula. Final value uses [UnitStat_NumAllShards] -15, so with every shard added effect will be reduced by one (no shards 15, two shards 13, etc...). It is supposed to use calculated "ExtraDamageFromShards" value (-4 morale per shard).
8) Good Luck doesn't add Dodge, it gives Defense bonus. Also, it's not 50, but 25. Plus, just like Air spells, it doesn't scale well with intelligence
Is it supposed to be dodge or other way around? 25 or 50? I don't know, but what I do know is that intelligence bonus isn't taken properly, since there is no ValueOwner for intelligence calculation, so intelligence of the affected target will be used when calculating defense bonus it gets.
9) Confusion leads to weird negative attack values
The issue here is that basis for calculation is total attack value of the unit. On the other hand AdjustUnitStat changes base attack value of the "soldier" in the unit.
This has following implications: Grouped units will lose more attack. 4 soldiers with 5 attack have total attack of 20, which will give reduction of -10atk. But since it is reduced per solider, every solider will get 5-10=-5 attack, and final attack of the unit will be -20.
Also, creatures with big strength are penalized. Monster that has total attack of 30 and strength of 30 has actually base attack of 10. So you'll get 10-15=-5 base attack, or -15 final attack, if Confusion is used.
.
I've written small code that could "patch" Confusion to work properly with there two factors:
Code: xml
- <Calculate InternalName="TargetAttack" ValueOwner="TargetUnit">
- <Expression><![CDATA[[UnitStat_Attack] * -0.5]]></Expression>
- </Calculate>
- <Calculate InternalName="StrengthMod" ValueOwner="TargetUnit">
- <Expression><![CDATA[[UnitStat_Strength] / 10.0]]></Expression>
- </Calculate>
- <Calculate InternalName="Value">
- <Expression><![CDATA[[TargetAttack] / [StrengthMod]]]></Expression>
- </Calculate>
- <Calculate InternalName="Value" ValueOwner="TargetUnit">
- <Expression><![CDATA[[Value] / [TroopCount]]]></Expression>
- </Calculate>
Unfortunately, these are not only two possible factors. There are things like attack bonus due to tehnology or bonus from terrain. But these factors don't have such big effect to lead to negative values, so it is decent workaround.
10) Berserk doesn't work
This is because both AdjustUnitStat effects it buffs add to unit attack, canceling each other. Second effect should have UnitStat_Defense as string that defines what is buffed, not attack.
Still, if this gets fixed, spell would suffer from similar problems as Confusion. Grouped units will get insane attack bonus and negative defense. Additionally, strength and dexterity would garble calculations (strong creatures would get more attack then they should, dexterous creatures would get negative defense). Plus, there is terrain defense, as pretty common factor (which would lead to higher reduction of defense then intended).
EDIT:
I noticed that new fancy Ice Blast ability of Ice Lord has undocumented hurricane effect (random teleportation of target). I doubt it was indented. Why would ice blast move someone? Loss of round and some true damage is more then enough.