I was editing the firebreath ranged attack (there are 3, this one, bows and catapults in RangedAttackSpells.xml)
It was different of the rest of things, whose code I checked. I needed the base value to be positive or I would miss all the time. Having ValueOwner in multiple clauses, caused the max damage bug (in this case it didn't matter if the value was positive or negative).
Working tested code part for the damage:
Code: xml
- <Calculate InternalName = "Value" ValueOwner="CastingUnit">
- <Expression><![CDATA[[UnitStat_Attack]*1]]></Expression>
- </Calculate>
- <Calculate InternalName = "MinValue">
- <Expression><![CDATA[0.<img src="//web.stardock.net/images/smiles/themes/digicons/5 Stars.png" alt="" />[Value]]]></Expression>
- </Calculate>
- <Calculate InternalName = "MaxValue">
- <Expression><![CDATA[1*[Value]]]></Expression>
- </Calculate>
Hope this helps someone.