Quote:
Originally Posted by dungeonguru
hero.child[Initiative].field[Penalty].value -= maximum(round(#levelcount[Fighter]/4,0,-1),1)
|
Honestly for any Class Ability should never hard-code a specific class as it prevents the ability from being used by other classes.
Class Abilities have a field called xTotalLev that should be used to get total class level. In addition its easy to apply "effective class increases" by using the above field.
If it was me building a class ability I would always store the value that increases/decreases into abValue to allow outside scripts to affect the ability.
Meaning I end up with the following logic:
Code:
field[abValue].value += -1 * maximum(round(field[xTotalLev].value/4,0,-1),1)
hero.child[Initiative].field[Penalty].value += field[abValue].value