I have most of this done via a feat that provides an additional feat.
It messes up the experience.
It seems tXP isn't a a changeable item. Is there a better way to reduce LA on a race without this trouble? The XP appeared to be auto corrected, but it is different. It is coming in at 27,000 xp for a Centaur (4HD 2LA) instead of the correct 24,000 xp to buy it off.
Anyone have any idea how to fix this issue?
It messes up the experience.
It seems tXP isn't a a changeable item. Is there a better way to reduce LA on a race without this trouble? The XP appeared to be auto corrected, but it is different. It is coming in at 27,000 xp for a Centaur (4HD 2LA) instead of the correct 24,000 xp to buy it off.
Anyone have any idea how to fix this issue?
Code:
var rHD as number
var rLA as number
var UALA as number
var reduced as number
var xpcost as number
~ Add to feats allowed
herofield[tFeats].value += 1
foreach pick in hero from BaseRace
if (eachpick.field[rHitDice].value > 0) then
rHD += eachpick.field[rHitDice].value
rLA += eachpick.field[cLevelAdj].value
endif
nexteach
rLA -= rHD
UALA = rLA * 3
if (herofield[tLevel].value >= UALA) then
reduced = 1
xpcost = (rLA + rHD + UALA - 1) * 1000
endif
debug "UALA"
debug UALA
debug "rLA"
debug rLA
debug "Levels"
debug herofield[tLevel].value
if (rLA = 2) then
debug "Testing rLA = 2"
UALA = rLA * 3 + (rLA - 1) * 3
debug "UALA 2nd round"
debug UALA
if (herofield[tLevel].value >= UALA) then
reduced += 1
xpcost += (rLA - 1 + rHD + UALA - 1) * 1000
endif
endif
if (rLA = 3) then
UALA = rLA * 3 + (rLA - 1) * 3 + (rLA - 2) * 3
if (herofield[tLevel].value >= UALA) then
reduced += 1
xpcost += (rLA - 2 + rHD + UALA - 1) * 1000
endif
endif
debug "XP Cost"
debug xpcost
debug "Reduced LA"
debug reduced
~ Reduce Experience
herofield[tXP].value -= xpcost
~ Reduce Level Adjustment
herofield[tLevelAdj].value -= reduced