diff --git a/src/micropolisj/engine/Sprite.java b/src/micropolisj/engine/Sprite.java index c31e0e6..e7f1dc4 100644 --- a/src/micropolisj/engine/Sprite.java +++ b/src/micropolisj/engine/Sprite.java @@ -179,28 +179,28 @@ public abstract class Sprite return; int t = city.getTile(xpos, ypos); + if (isOverWater(t)) { + // becomes water + city.setTile(xpos, ypos, RIVER); + return; + } - if (t >= TREEBASE) { - if (isBridge(t)) { - city.setTile(xpos, ypos, RIVER); + if (!isCombustible(t)) { + // cannot destroy it + return; + } + + if (isZoneCenter(t)) { + city.killZone(xpos, ypos, t); + + CityDimension d = getZoneSizeFor(t); + if (d.width >= 3 && d.height >= 3) { + city.makeExplosion(xpos, ypos); return; } - if (!isCombustible(t)) { - return; //cannot destroy it - } - if (isZoneCenter(t)) { - city.killZone(xpos, ypos, t); - if (t > RZB) { - city.makeExplosion(xpos, ypos); - } - } - if (isOverWater(t)) { - city.setTile(xpos, ypos, RIVER); - } - else { - city.setTile(xpos, ypos, TINYEXP); - } } + + city.setTile(xpos, ypos, TINYEXP); } /** diff --git a/src/micropolisj/engine/TileConstants.java b/src/micropolisj/engine/TileConstants.java index 8af0324..2ab3683 100644 --- a/src/micropolisj/engine/TileConstants.java +++ b/src/micropolisj/engine/TileConstants.java @@ -275,12 +275,6 @@ public class TileConstants ); } - //used by Sprite::destroyTile - public static boolean isBridge(int tile) - { - return isRoad(tile) && !isCombustible(tile); - } - public static boolean isCombustible(int tile) { assert (tile & LOMASK) == tile;