Thanks Caped, that worked. I also needed to adjust the timing. If anyone interested, here is the working code:
Code:
foreach pick in hero where "component.Arcane"
var powbonus as number
powbonus = #traitfound[skSpellcst]
debug powbonus
~ Half Deep Connection die in Power Points
eachpick.field[resMax].value += powbonus
nexteach
Timing needs to be set to: Traits 5000
You replace the "skill" with whatever appropriate arcane skill. And make sure Number of Powers is 0. Or you could use this to add bonus Power Points I guess