diff --git a/core/src/main/assets/environment/tiles_caves.png b/core/src/main/assets/environment/tiles_caves.png index 6dcc4671e..1809edecf 100644 Binary files a/core/src/main/assets/environment/tiles_caves.png and b/core/src/main/assets/environment/tiles_caves.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java index 1886f861f..cf7349c25 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java @@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.traps.StormTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.SummoningTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.WarpingTrap; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTileSheet; import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.watabou.noosa.Game; import com.watabou.noosa.Group; @@ -158,11 +159,15 @@ public class CavesLevel extends RegularLevel { addCavesVisuals( this, visuals ); return visuals; } - + public static void addCavesVisuals( Level level, Group group ) { + addCavesVisuals(level, group, false); + } + + public static void addCavesVisuals( Level level, Group group, boolean overHang ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { - group.add( new Vein( i ) ); + group.add( new Vein( i, overHang ) ); } } } @@ -170,13 +175,20 @@ public class CavesLevel extends RegularLevel { private static class Vein extends Group { private int pos; + + private boolean includeOverhang; private float delay; - + public Vein( int pos ) { + this(pos, false); + } + + public Vein( int pos, boolean includeOverhang ) { super(); this.pos = pos; + this.includeOverhang = includeOverhang; delay = Random.Float( 2 ); } @@ -197,11 +209,20 @@ public class CavesLevel extends RegularLevel { } delay = Random.Float(); - + PointF p = DungeonTilemap.tileToWorld( pos ); - ((Sparkle)recycle( Sparkle.class )).reset( - p.x + Random.Float( DungeonTilemap.SIZE ), - p.y + Random.Float( DungeonTilemap.SIZE ) ); + if (includeOverhang && !DungeonTileSheet.wallStitcheable(Dungeon.level.map[pos-Dungeon.level.width()])){ + //also sparkles in the bottom 1/2 of the upper tile. Increases particle frequency by 50% accordingly. + delay *= 0.67f; + p.y -= DungeonTilemap.SIZE/2f; + ((Sparkle)recycle( Sparkle.class )).reset( + p.x + Random.Float( DungeonTilemap.SIZE ), + p.y + Random.Float( DungeonTilemap.SIZE*1.5f ) ); + } else { + ((Sparkle)recycle( Sparkle.class )).reset( + p.x + Random.Float( DungeonTilemap.SIZE ), + p.y + Random.Float( DungeonTilemap.SIZE ) ); + } } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/MiningLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/MiningLevel.java index 038a66858..3b535bbac 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/MiningLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/MiningLevel.java @@ -130,7 +130,7 @@ public class MiningLevel extends CavesLevel { @Override public Group addWallVisuals() { super.addWallVisuals(); - CavesLevel.addCavesVisuals(this, wallVisuals); + CavesLevel.addCavesVisuals(this, wallVisuals, true); return wallVisuals; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java index c17096217..615e07a35 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java @@ -303,8 +303,7 @@ public class DungeonTileSheet { if (tile == Terrain.BOOKSHELF || below == Terrain.BOOKSHELF) result = WALL_INTERNAL_WOODEN; //TODO currently this line on triggers on mining floors, do we want to make it universal? - else if (Dungeon.branch == 1 && - (tile == Terrain.WALL_DECO || below == Terrain.WALL_DECO)) result = WALL_INTERNAL_DECO; + else if (Dungeon.branch == 1 && tile == Terrain.WALL_DECO) result = WALL_INTERNAL_DECO; else result = WALL_INTERNAL; if (!wallStitcheable(right)) result += 1;