View Single Post
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 289

Old July 11th, 2020, 06:13 AM
Quote:
Originally Posted by Sendric View Post
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.
Illyahr is offline   #1002 Reply With Quote