View Single Post
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 18th, 2017, 11:34 AM
Quote:
Originally Posted by Aaron View Post
On the conditions tab there is a "mounted" condition, which points at any creature the hero is currently riding. You can transition from there to the other hero and make changes as necessary. Here is an example, from the Cavalier's Mounted Mastery ability:

Code:
      ~ get the strength bonus of our current mount
      if (hero.child[pstMounted].field[pMount].ischosen <> 0) then
        field[abValue3].value += hero.child[pstMounted].field[pMount].chosen.minion.child[aSTR].field[aModBonus].value
        endif
Okay, that gets me most of the way. The code I'm using is:
Code:
~ Calculate bonus
field[abValue2].value += round(field[xTotalLev].value / 4, 0, -1) + 1

~ Add AC bonus to mount if hero is mounted.
      if (hero.child[pstMounted].field[pMount].ischosen <> 0) then
        hero.child[pstMounted].field[pMount].chosen.minion.child[ArmorClass].field[BonComp].value += field[abValue2].value
        endif
The editor has no problems with the script, and the bonus is being recognized (when I look at the Armor Class breakdown, I see the competence bonus), but the actual armor class of the minion isn't changed.
Bob G is offline   #4 Reply With Quote