Recently while adding feats from Drow of the Underdark I ran across several that required negative energy channeling/rebuke undead. I entered the following pre-req.
~ If our hero has the Turn Undead tag, go through each Class Helper and determine if it has a cClrNeutGE field value of 1, if so then we are valid. We are also valid if we have the Blackguard's Command Undead ability showing.
doneif (hero.tagis[Hero.TurnUndead] = 0)
validif (hero.childfound[cBlkCommUn].tagis[Helper.ShowSpec] <> 0)
var result as number
foreach pick in hero from BaseClHelp
if (each.field[cClrNeutGE].value = 1) then
result += 1
elseif (each.field[cClrTurn].value = 1) then
result += 1
endif
nexteach
validif (result <> 0)
However I can't do a similar thing for Positive energy channeling because all classes that do not turn have a field[cClrNeutGE].value & field[cClrTurn].value = 0. I am using a work around that looks specifically for the Cleric & Mystic Class (one of whose domains grants turning) as well as the Paladin's Turn Undead class special.
But is there a simpler and better way to do this?
~ If our hero has the Turn Undead tag, go through each Class Helper and determine if it has a cClrNeutGE field value of 1, if so then we are valid. We are also valid if we have the Blackguard's Command Undead ability showing.
doneif (hero.tagis[Hero.TurnUndead] = 0)
validif (hero.childfound[cBlkCommUn].tagis[Helper.ShowSpec] <> 0)
var result as number
foreach pick in hero from BaseClHelp
if (each.field[cClrNeutGE].value = 1) then
result += 1
elseif (each.field[cClrTurn].value = 1) then
result += 1
endif
nexteach
validif (result <> 0)
However I can't do a similar thing for Positive energy channeling because all classes that do not turn have a field[cClrNeutGE].value & field[cClrTurn].value = 0. I am using a work around that looks specifically for the Cleric & Mystic Class (one of whose domains grants turning) as well as the Paladin's Turn Undead class special.
But is there a simpler and better way to do this?