mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fixes #324 - changes possible modulo range from 0-29 to 1-29 to prevent mod by 0
This commit is contained in:
parent
8d272c8234
commit
522ab2cd98
@ -251,7 +251,7 @@ impl Item {
|
|||||||
1 => Self::velorite(),
|
1 => Self::velorite(),
|
||||||
2 => Item::Tool {
|
2 => Item::Tool {
|
||||||
kind: *(&ALL_TOOLS).choose(&mut rand::thread_rng()).unwrap(),
|
kind: *(&ALL_TOOLS).choose(&mut rand::thread_rng()).unwrap(),
|
||||||
power: 8 + rand::random::<u32>() % (rand::random::<u32>() % 30),
|
power: 8 + rand::random::<u32>() % (rand::random::<u32>() % 29 + 1),
|
||||||
stamina: 0,
|
stamina: 0,
|
||||||
strength: 0,
|
strength: 0,
|
||||||
dexterity: 0,
|
dexterity: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user