Fix the 'Executing NaN bunnies' bug, I hope

This commit is contained in:
Eric Fredricksen
2018-09-13 22:21:00 -07:00
committed by Eric Fredricksen
parent 18720d057b
commit 8dc94f2c2a
+1 -1
View File
@@ -233,7 +233,7 @@ function MonsterTask(level) {
var qty = 1; var qty = 1;
if (level-lev > 10) { if (level-lev > 10) {
// lev is too low. multiply... // lev is too low. multiply...
qty = Math.floor((level + Random(lev)) / Max(lev,1)); qty = Math.floor((level + Random(Max(lev,1))) / Max(lev,1));
if (qty < 1) qty = 1; if (qty < 1) qty = 1;
level = Math.floor(level / qty); level = Math.floor(level / qty);
} }