Fix default fixed waves.
This commit is contained in:
@@ -58,11 +58,11 @@ public class DefaultWave extends AbstractWave
|
|||||||
Map<MACreature,Integer> result = new HashMap<MACreature,Integer>();
|
Map<MACreature,Integer> result = new HashMap<MACreature,Integer>();
|
||||||
|
|
||||||
// For fixed waves, we just convert the accumulated map
|
// For fixed waves, we just convert the accumulated map
|
||||||
int acc = 0;
|
int last = 0;
|
||||||
for (Map.Entry<Integer,MACreature> entry : monsterMap.entrySet()) {
|
for (Map.Entry<Integer,MACreature> entry : monsterMap.entrySet()) {
|
||||||
int prob = entry.getKey();
|
int prob = entry.getKey();
|
||||||
result.put(entry.getValue(), prob - acc);
|
result.put(entry.getValue(), prob - last);
|
||||||
acc += prob;
|
last = prob;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user