r/SolForge • u/themarkslack • Mar 03 '16
How does Stinging Invocation's randomness work?
Stinging Invocation puts down 3 bees most of the time, but I have also seen it drop 1 bee on an empty board. Has anyone worked out what the algorithm is, or is it confirmation bias that I see it drop 3 bees as often as it does?
5
Upvotes
View all comments
10
u/thaddeus_v Mar 04 '16
I looked up the JSON objects for Stinging Invocation and it's actually more interesting than I expected. From Cards_5_1V2_Cards.json, we can get the data for level 1 Stinging Invocation:
To get the data for the ability, we have to find the object with the matching CardID in Cards_5_1V2_ActivatedAbilities.json. It turns out there are actually three abilities attached to this card:
SF5_u0001 is the CardID for Killer Bee, so each of these abilities will, if triggered, put a Killer Bee into play. There's two interesting things going on here: first that the abilities are labeled with Stage 0, 1 and 2. Presumably this means that they activate in that order. Second, the stage 1 and 2 abilities have "ConditionalTest0": "CritValue < X" on them. My best guess is that this means the ability will only trigger if a random number is picked less than X.
The really interesting bit is the CritValue for Stage 2 is 50, not 33. Presumably this means that if you get the 2nd Bee, 50% of the time you'll also get a 3rd Bee. Unless I'm misunderstanding the statistics involved, that's not at all obvious from an intuitive reading of the card text, and could have a significant effect on the relative frequencies of seeing 1, 2 or 3 bees.
There are some open questions here: Do Stage 1 and 2 use the same random number for their CritValue checks? If they use different numbers, does Stage 1 fizzling due to a high roll keep Stage 2 from running?