Fixes non-existant treasure bug
This commit is contained in:
parent
9bcb398f94
commit
4a6422fc09
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue