Hi all,
I did a search on 'increment,' but found nothing, so I'm hoping the Collective can help.
I'm working on a treasure generator for S&W. If you're not familiar, the system starts with a total gp value but lets you "trade out" cash for other bits. For example, for every 100gp value of the treasure, there's a 10% chance that you convert that 100gp into a small gem or minor magic item.
I've assigned the total gp value to a variable {$coinCount}, and for every trade out, I need to reduce that number by the value of the trade out.
For example, if I start with {$coinCount} = 500, I roll 5 times for a trade out (1 roll per 100gp). Let's say 2 of the rolls generate gems - regardless of their value, {$coinCount} now equals 300gp.
How do I decrement {$coinCount} every time a trade out occurs?
Cheers,
Comments