View Single Post
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old November 14th, 2011, 05:07 PM
Quote:
Originally Posted by Kendall-DM View Post
I've actually cleaned up Natural Bond by reducing alot of the code. If interested in a cleaner version, here it is.
I want to first apologize for not thoroughly testing this once I had the fix in place. I apparently only tested it on single class druids, as the ranger and the multi-classed druid were not giving their bonuses to their effective levels. I have now thoroughly tested this, and it appears to work as expected. Originally, I was approaching from the "what level you have to be to get a companions" rather than having your companion have the benefits based on what your druid level can effectively be. In that regard, I was modifying the wrong field. I added some extra coding in case someone took natural bond before they actually took an animal companion (say a low level ranger, or a class that is thinking of multi-classing to an animal companion class).

First/499
Code:
~ If we're disabled, do nothing.
doneif (tagis[Helper.FtDisable] <> 0)
doneif (hero.childlives[cAnimClass] = 0)
doneif (hero.childlives[cAnimComp] = 0)

~ If we are within range of our effective druid level.
var bonus as number
bonus = #totallevelcount[] - hero.child[cAnimClass].field[CompClLev].value - hero.child[cAnimComp].field[CompLevAdj].value
bonus = minimum(bonus,3)

~ Add the bonus to our companion level.
hero.child[cAnimComp].field[CompLevAdj].value += bonus
Kendall-DM is offline   #10 Reply With Quote