Need for predictable random generator

前端 未结 30 1073
情话喂你
情话喂你 2020-11-27 09:04

I\'m a web-game developer and I got a problem with random numbers. Let\'s say that a player has 20% chance to get a critical hit with his sword. That means, 1 out of 5 hits

30条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 09:50

    Your best solution might be play-testing with multiple different nonrandom schemes and pick the one that makes players happiest.

    You might also try a back-off policy for the same number in a given encounter, e.g., if a player rolls a 1 on their first turn accept it. To get another 1 they need to roll 2 1s in a row. To get a third 1 they need 3 in a row, ad infinitum.

提交回复
热议问题