View Single Post
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old October 1st, 2023, 09:45 AM
Don't store the Id of the pick as text. Store some identity tag from the target pick on the picks you're foreaching through. Since this is attributes, and there's only 6 of them, use a 6-item if...elseif to apply the bonus to the correct attribute. If there were more picks, a nested foreach would be the way to find them.

Also, why is this script using a foreach - can't these AMSAffin picks run the script themselves, instead of running it from some master pick? As far as I can tell, this would be a 3-line script on those picks:

doneif (tagis[Helper.FirstCopy] = 0)
doneif (tagis[Affinity.?] = 0)

hero.chilfdound[aDex].field[aPostMod].value += round(field[abValue3].value/2,0,-1)

(just copying the script from pick to pick, changing the attribute Id for each one).

Last edited by Mathias; October 1st, 2023 at 09:49 AM.
Mathias is offline   #2 Reply With Quote