View Single Post
Gumbytie
Senior Member
 
Join Date: Jun 2010
Location: Florida
Posts: 169

Old December 18th, 2018, 12:51 PM
So back into coding things for Beats & Barbarians to name a few.

Have an Edge that should apply a +2 bonus to 2 specific Knowledge Skills. So I have some code, but it only ever applies the bonus to ONE of them. I am a bit code rusty so I am probably just missing something obvious:

Set at Pre-Traits 5000, with Calc trtFinal in apparopriate spot.

Code:
if (field[abilActive].value <> 0) then
~go through all knowledge skills and find an "Arcana" one
foreach pick in hero where "thingid.skKnow"
   if (compare(lowercase(eachpick.field[domDomain].text),"arcana") = 0) then
      perform #traitprof[skKnow,+,2,"Demon Hunter"]
   endif
   if (compare(lowercase(eachpick.field[domDomain].text),"religion") = 0) then
      perform #traitprof[skKnow,+,2,"Demon Hunter"]
   endif
nexteach
endif
It boils down to whichever I happen to purchase first, it ends up with the bonus only.

Even when I separated these into 2 separate Eval scripts same results.
Gumbytie is offline   #1 Reply With Quote