Quote:
Originally Posted by 12hourhalfday
We actually want armor rating to stack with damage reduction. Does that mean we can just remove the last line?
Code:
hero.child[xDamRd].field[abValue].value = maximum(hero.child[xDamRd].field[abValue].value, field[abValue].value)
|
Not exactly. If you want to stack or ADD then instead of a doing a equal you want to say ADD to what ever DR already exists. So change it to be:
Code:
hero.child[xDamRd].field[abValue].value += field[abValue].value
~ Above is a short hand way of doing the following:
hero.child[xDamRd].field[abValue].value = hero.child[xDamRd].field[abValue].value + field[abValue].valuefield[abValue].value
~ Both the lines above do the exact same thing one is just shorter to write.
~ P.S. anything with a squiggly line in front is a comment in HL.
So now we are saying take the existing Value of Thing.
xDamRd and add in the
field[abValue].value Value which in this case is 2.
You may need to change the timing of this script to be just before when
xDamRd does its calculations as all other DR scripts are set to not stack.
So to find the timing of
xDamRd you will need to go to the
Ability tab in the editor and do a
New (Copy). Then find
xDamRd in the list and double click on it. Then click on the Eval Script on the top right corner and see when its Phase/Timing is and go just before it.