I have a text adventure game with battle system in place already. It is of course turn based, both player and enemy deal damage points (in float). I use random.uniform() function to generate attack points for every round.
Zero stands for missing an enemy or player. However since I use floats that chance is pretty slim. I want to create a condition where there would be let's say a chance 1 in 5 that attack points equal 0.00. This condition must be run on every round.
How would I go about it? Is there a module I could use?
note: I think I could use random module (random.randint(0,5)) but I was wondering if there is some other way. Thanks!
random.randint(0,4)and it works pretty good. But I'm still interested in other solutions.