Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Hello everyone, me again...
I have an ability that the user may select more than once. Each time it is added, it grants a +1 bonus. I only want the class tab to show the ability once, reflecting the bonus based on how many times the user has selected it. I thought that using the FirstCopy tag would help: Code:
If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) ~ If we're disabled, just get out now doneif (tagis[Helper.SpcDisable] <> 0) ~ Only add the first copy doneif (tagis[Helper.FirstCopy] = 0) ~Add a +1 bonus to Will saving throws against fear and mind-affecting effects. field[abValue].value += field[xIndex].value #situational[hero.childfound[svWill],signed(field[abValue].value) & " to saves against fear and mind-affecting effects.",field[thingname].text] Is FirstCopy the right tag to be using here? If not, what would work? |
#1 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Bumpedy bump bump.
Projects: Legendary Rogue (Legendary Games) 97.9%, Assassin (Interjection Games) 88%, Fortunate (rebuild of Luckbringer, Rite Publishing) 87.2%, Adept Godling (Super Genius Games) 73.9%, Eldritch Godling (Super Genius Games) 72.9%, Mighty Godling (Super Genius Games) 44.3%, Clever Godling (Super Genius Games) 41.2%, Legendary Cavalier (Legendary Games) 30.9% Message me for a list of completed projects. Visit my blog! https://gauntletsofblogrepower.blogspot.com/ |
#2 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
If I understand what you mean, then what you ask for as far as showing only one pick on the class tab is impossible. You CAN have only a single copy show on the specials tab, and you CAN have later copies of abilities add to the first, but any table to which Users add picks MUST show all picks. Otherwise, there would be no way to delete the added picks.
Also, the type of pick which are user added to class tabs are Custom Specials. They have a different setup, so you can't count on the xIndex field (as you would with Class Specials), and they do not automatically get FirstCopy assigned. For an example of a custom special which can be taken multiple times to stacking effect, check out the Deadly Range Ninja/Slayer talent (cNinDeadRa). Here is the relevant code for that. PostLevel 10000 Code:
~ This procedure declares one copy the first (assigning Helper.FirstCopy) ~ and sets the quickadd to the same copy. All others redirect to this first ~ copy and add some value to it (defined by the incrval variable). The ~ final combined value will be in the abValue field of the first copy (if ~ setval1 = 1) or in the trkMax field of the same (if setval1 = 0). var incrval as number var setval1 as number incrval = 10 setval1 = 1 call combocopy if (tagis[Helper.FirstCopy] <> 0) then ~ Nothing else perform assign[Helper.SpecUp] endif |
#3 |
|
|