v0.6.5: adjusted cave spinners to hopefully prevent web stacking

This commit is contained in:
Evan Debenham 2018-05-02 01:35:24 -04:00 committed by Evan Debenham
parent 1225bd3325
commit a587347102

View File

@ -88,8 +88,9 @@ public class Spinner extends Mob {
@Override
public void move(int step) {
if (state == FLEEING) {
GameScene.add(Blob.seed(pos, Random.Int(5, 7), Web.class));
int curWeb = Blob.volumeAt(pos, Web.class);
if (state == FLEEING && curWeb < 5) {
GameScene.add(Blob.seed(pos, Random.Int(5, 7) - curWeb, Web.class));
}
super.move(step);
}