Quote:
Originally Posted by Sendric
foreach loops are powerful, but also notoriously slow. As a modification, please try this:
Code:
~ Assign the appropriate tag to all weapons that meet the criteria
foreach pick in hero where "WepFocus.? & (thingid.wBattleaxe | thingid.wWarhammer | thingid.wGreatclub)"
perform each.delete[wCritMult.?]
if (eachpick.tagis[thingid.wGreatclub] <> 0) then
perform eachpick.assign[wCritMult.3]
else
perform eachpick.assign[wCritMult.4]
endif
nexteach
|
Unfortunately, it only works for the selected type of weapon. If you had two of them with weapon focus, only one would get the critical bonus.