While being bored during maths class today, I thought about Angband. And the [XdY] notation for damage/healing. And ToME 3, which prefers [X-XY].
Until then I thought that XdY perfectly equals X-XY, but that's not true.
I'll take 3d3 as example.
3-9 means that there's an equal chance for each number to be chosen randomly (in that case, around 14% per number).
But 3d3 is different:
As you see, you'll get more average values.
And now the question I wanted to ask:
Does Angband one random() for each dice
{ for (y; y > 0; y--) foo += random(x) + 1 }
or only one big random using-xy?
{ foo +=randomX(x, xy) + 1 }
Not that it would make a big difference, the average stays the same after all, but I'm in my curious-about-Angband-game-mechanics-phase.
Until then I thought that XdY perfectly equals X-XY, but that's not true.
I'll take 3d3 as example.
3-9 means that there's an equal chance for each number to be chosen randomly (in that case, around 14% per number).
But 3d3 is different:
Code:
| # | A | B | |-------------- | 3 | 1 | 4% | | 4 | 3 | 11% | A = Possible different combinations | 5 | 6 | 22% | B = Probability | 6 | 7 | 26% | | 7 | 6 | 22% | | 8 | 3 | 11% | | 9 | 1 | 4% |
And now the question I wanted to ask:
Does Angband one random() for each dice
{ for (y; y > 0; y--) foo += random(x) + 1 }
or only one big random using-xy?
{ foo +=randomX(x, xy) + 1 }
Not that it would make a big difference, the average stays the same after all, but I'm in my curious-about-Angband-game-mechanics-phase.
Comment