View Single Post
Seeker1728
Member
 
Join Date: Mar 2013
Location: LV, NV
Posts: 65

Old March 18th, 2021, 12:54 PM
CC: Thanks Brother, made use of your suggested code and does what I need it to. However I'm a bit confused on a couple of points and was hoping you had the time/inclination to provide clarity/guidance.

In your remark, you said "Only do this once, they are expensive", I'm assuming you're referring to how much effort HL has to do to process such things, and that if I have too many in the .user file that it makes the tool sluggish. What I'm confused on is where the suggestion of restraint factors in, is in how many Mechanics I create or how many powers I want to hide modifiers from?

Tangential to the above question, lets say I have 10 powers that I want to preclude two power modifiers from. For the sake of clarity, lets say i want all 10 of these powers to not be able to access the Switchable modifiers of Primary/Alternate. And lets say that on 3 of these powers, I also don't want them to be able to choose the "Limitation 1/2" power mods.

Do I:
A) Create a mechanic for each power separately, I.E. create a mechanic for power #1, then the same mechanic but for power #2, etc?

B) Put all 10 powers in one eval script?

In anticipation that your answer is B, I'm not sure if my understanding of script writing is proper so a quick example to see if I would be doing this correctly or if it makes you fall off your chair laughing hysterically

Code:
foreach pick in hero where "component.Power"
        if (eachpick.tagis[SPCPower.spcSCFire] <> 0) 
        if (eachpick.tagis[SPCPower.spcSCBeast] <> 0)
        if (eachpick.tagis[SPCPower.spcSCBeuty] <> 0)
        if (eachpick.tagis[SPCPower.spcSCChaos] <> 0) 
then
          perform eachpick.delete[SPCPwrMod.s2mSwitchB]
          perform eachpick.delete[SPCPwrMod.s2mSwitchA]

          endif
        nexteach

Again, assuming your answer is B above, assuming that powers 8-10 have 2 additional power modifiers to be excluded, do I write the script as follows?


Code:
foreach pick in hero where "component.Power"
        if (eachpick.tagis[SPCPower.spcSCFire] <> 0) 
        if (eachpick.tagis[SPCPower.spcSCBeast] <> 0)
        if (eachpick.tagis[SPCPower.spcSCBeuty] <> 0)
        if (eachpick.tagis[SPCPower.spcSCChaos] <> 0) 
then
          perform eachpick.delete[SPCPwrMod.s2mSwitchB]
          perform eachpick.delete[SPCPwrMod.s2mSwitchA]

          endif
foreach pick in hero where "component.Power"
        if (eachpick.tagis[SPCPower.spcSCFire] <> 0)
        if (eachpick.tagis[SPCPower.spcSCBeast] <> 0)
then
          perform eachpick.delete[SPCPwrMod.s2mLimit1]
          perform eachpick.delete[SPCPwrMod.s2mLimit2]

          endif
 
        nexteach
Seeker1728 is offline   #16 Reply With Quote