On a related note, a colleague once worked at a place where they did this for on-call: Everyone has an on-call score. Every week, the person on-call had their score set to zero, and everyone else incremented by one. You could plan out the next couple of months this way, and it provided an elegant way for new hires to take their place - they start at zero, and were generally familiar enough by the time their number came around.
There were some housekeeping rules to work around the organicness of human life - if someone went on holiday they kept their score, for example - but overall it seemed to work.
How do I run this code? I thikn I succesfully installed the package with npm. There were some warnings but no error. But how do I run:
> const RiggedDie = require('gamblers-dice') > const die = new RiggedDie(20) // for a d20 > console.log(die.roll()) // 1 -> 20 > console.log(die.roll()) // keep using the same instance Do I put it in a file?
Do I copy paste it into a REPL? If so what provides that REPL? I am always surprised when sample code providers assume I know their languages ecosystem. UPDATE: Apparently I can use "node" as a REPL for this.
This "unfair RNG" issue was big in Dota 2 (a popular video game) for a while. They ultimately implemented something similar and AFAIK now all "random" effects use it.
yeah but now it applies for I think everything. The last one to go was Spirit Breaker's bash. Prior to that PA's crit.
Funny thing is that with PRNG you can "warm up" via farming creep camps so if you don't crit in say 5 attacks you can go look for a fight and be "guaranteed" a crit with your first swing.
RNG stands for Random Number Generator. It is used colloquially, in gaming, to refer to the probability of certain random events or the underlying implementation of them.
Not quite all; there are still a handful of skills that use a discrete or flat distribution but practically all attack based changes use the pseudo random distribution.
For more info:
http://dota2.gamepedia.com/Random_distribution
Comments (230) 51 threads
Earlier commentsThere were some housekeeping rules to work around the organicness of human life - if someone went on holiday they kept their score, for example - but overall it seemed to work.
> const RiggedDie = require('gamblers-dice')
> const die = new RiggedDie(20) // for a d20
> console.log(die.roll()) // 1 -> 20
> console.log(die.roll()) // keep using the same instance
Do I put it in a file? Do I copy paste it into a REPL? If so what provides that REPL?
I am always surprised when sample code providers assume I know their languages ecosystem.
UPDATE: Apparently I can use "node" as a REPL for this.
All comments shown.
Couldn't load more comments. Check your connection and try again.