Senior Member
Join Date: Jul 2010
Posts: 3,147
|
I'm looking at the feats that increase class level for certain purposes, such as Practiced Spellcaster and Natural Bond. It looks like Natural Bond isn't working, and there's an author comment about that. So far, the eval script looks like:
Code:
~ Add 3 to our companion level. hero.childfound[cAnimClass].field[CompClLev].value += 3 hero.childfound[cAnimComp].field[CompLevBas].value += 3 Practiced Spellcaster looks like: Code:
field[fChosen].chosen.field[cCasterLev].value += 4 field[fChosen].chosen.field[cCasterLev].value = minimum(field[fChosen].chosen.field[cCasterLev].value, herofield[tHitDice].value) Last edited by Sendric; August 19th, 2010 at 06:45 AM. |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Natural Bond is from Complete Adventurer:
Quote:
Quote:
|
||
#2 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Ok, I made something that seems to work. It's probably going to be offensive to real programmers, so I apologize for that:
Code:
if (#totallevelcount[] - #levelcount[Druid] = 1) then hero.childfound[cAnimComp].field[CompLevel].value += 1 elseif (#totallevelcount[] - #levelcount[Druid] = 2) then hero.childfound[cAnimComp].field[CompLevel].value += 2 elseif (#totallevelcount[] - #levelcount[Druid] >= 3) then hero.childfound[cAnimComp].field[CompLevel].value += 3 endif |
#3 |
Member
Join Date: Jun 2010
Posts: 90
|
LOL! I've done that myself. And yeah, they do usually find it offensive (my programing teacher always docked me points for "excessive code"), but hey, it works for now, and you can always improve it when you learn how to later on.
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Code:
var bonus as number bonus = #totallevelcount[] - #levelcount[Druid] bonus = minimum(bonus,3) hero.childfound[cAnimComp].field[CompLevel].value += bonus |
#5 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Oh, nice. That's much cleaner. Thanks.
|
#6 |
|
|