Hey all,
Doing a data set for Weird Wars II and have a question how best to code the Pickle Barrel Edge.
The requirements for the Edge are: Novice, Knowledge (Bombardier) d6+ or Piloting d6+
This is the code I put in the pre-reqs tab for the Edge and it seems to work well enough. Is there a cleaner way to select a specific Knowledge skill or to do this code block?
var total as number
~ look for the Knowledge(Bombardier) skill
foreach pick in hero where "thingid.skKnow"
~ check to see if it is at at least a d6
if (compare(lowercase(eachpick.field[domDomain].text),"bombardier") = 0) then
if (eachpick.field[trtFinal].value >= 3) then
total += 1
endif
endif
nexteach
~ look for the Piloting skill and see
~ if it is at least a d6
foreach pick in hero where "thingid.skPiloting"
if (eachpick.field[trtFinal].value >= 3) then
total +=1
endif
nexteach
~ if either skill is at a d6 then validate
validif (total >= 1)
if (@ispick <> 0) then
altpick.linkvalid = 0
endif
Doing a data set for Weird Wars II and have a question how best to code the Pickle Barrel Edge.
The requirements for the Edge are: Novice, Knowledge (Bombardier) d6+ or Piloting d6+
This is the code I put in the pre-reqs tab for the Edge and it seems to work well enough. Is there a cleaner way to select a specific Knowledge skill or to do this code block?
var total as number
~ look for the Knowledge(Bombardier) skill
foreach pick in hero where "thingid.skKnow"
~ check to see if it is at at least a d6
if (compare(lowercase(eachpick.field[domDomain].text),"bombardier") = 0) then
if (eachpick.field[trtFinal].value >= 3) then
total += 1
endif
endif
nexteach
~ look for the Piloting skill and see
~ if it is at least a d6
foreach pick in hero where "thingid.skPiloting"
if (eachpick.field[trtFinal].value >= 3) then
total +=1
endif
nexteach
~ if either skill is at a d6 then validate
validif (total >= 1)
if (@ispick <> 0) then
altpick.linkvalid = 0
endif