Fixes non-existant treasure bug

This commit is contained in:
Linus Probert 2018-09-03 08:43:05 +02:00
parent 9bcb398f94
commit 4a6422fc09
1 changed files with 4 additions and 3 deletions

View File

@ -116,13 +116,14 @@ create_treasure(int current_level)
unsigned int value;
amt = (unsigned int) 1 + get_random(5*current_level) % 40;
amt = amt == 0 ? 1 : amt;
if (current_level > 9) {
highest_treasure = TREASURE_COUNT;
} else if (current_level > 3) {
highest_treasure = PLATINUM;
} else {
} else if (current_level > 3) {
highest_treasure = GOLD;
} else {
highest_treasure = SILVER;
}
value = get_random(highest_treasure);