Hello everyone, I’ve often read these forums but never posted until now.
I have a module that uses the Deck feature to (among other things) count the number of pieces in a deck. For example, if I put two Stormtroopers and an Elite Stormtrooper in a deck, then it shows the “Activation” count (ie, unit count) as 3. Good so far.
Now I want to know how to Sum the total cost of those pieces. For example, if the Stormtroopers cost 5 each and the Elite Stormtrooper costs 12, I want it to provide me with the Sum (22 in this case).
Thanks to prototype definitions, every piece in the module has a Marker (Activation=1). I’m pretty sure that eventually I’ll need to add a Dynamic Property or another unique marker to indicate each piece’s Cost. However, at this point I need help with the actual formula or command line to calculate the Sum.
Do I need to do this via BeanShell coding? If so, would someone please suggest a line that I could copy into the “Expressions to Count” field in the Deck? I’m sorry if this seems like a noob-ish request; I’m very new to BeanShell coding and after a couple of hours of trial and error, I’ve come here for help.
Thanks in advance.