diff --git a/core/src/main/assets/dm100.png b/core/src/main/assets/dm100.png index dcbc9f3f5..7c35f7ee5 100644 Binary files a/core/src/main/assets/dm100.png and b/core/src/main/assets/dm100.png differ diff --git a/core/src/main/assets/ripper.png b/core/src/main/assets/ripper.png index f557bd822..41d5bf0ad 100644 Binary files a/core/src/main/assets/ripper.png and b/core/src/main/assets/ripper.png differ diff --git a/core/src/main/assets/spawner.png b/core/src/main/assets/spawner.png index a1f1caf8b..8ecfd0eb5 100644 Binary files a/core/src/main/assets/spawner.png and b/core/src/main/assets/spawner.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java index c54804ec5..c811abac1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; @@ -30,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Amulet; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTileSheet; import com.watabou.noosa.Group; import com.watabou.noosa.Tilemap; import com.watabou.utils.Bundle; @@ -47,8 +49,6 @@ public class LastLevel extends Level { viewDistance = Math.min(4, viewDistance); } - private int pedestal; - @Override public String tilesTex() { return Assets.TILES_HALLS; @@ -97,9 +97,6 @@ public class LastLevel extends Level { Painter.fill( this, MID - 2, height - 3, 5, 1, Terrain.EMPTY); Painter.fill( this, MID - 3, height - 2, 7, 1, Terrain.EMPTY); - Painter.fill( this, MID - 2, 9, 5, 7, Terrain.EMPTY); - Painter.fill( this, MID - 3, 10, 7, 5, Terrain.EMPTY); - entrance = (height-ROOM_TOP) * width() + MID; Painter.fill(this, 0, height - ROOM_TOP, width, 2, Terrain.WALL); map[entrance] = Terrain.ENTRANCE; @@ -107,8 +104,7 @@ public class LastLevel extends Level { Painter.fill(this, 0, height - ROOM_TOP + 2, width, 8, Terrain.EMPTY); Painter.fill(this, MID-1, height - ROOM_TOP + 2, 3, 1, Terrain.ENTRANCE); - pedestal = 12*(width()) + MID; - exit = pedestal; + exit = 12*(width()) + MID; for (int i=0; i < length(); i++) { if (map[i] == Terrain.EMPTY && Random.Int( 5 ) == 0) { @@ -116,7 +112,11 @@ public class LastLevel extends Level { } } + Painter.fill( this, MID - 2, 9, 5, 7, Terrain.EMPTY); + Painter.fill( this, MID - 3, 10, 7, 5, Terrain.EMPTY); + feeling = Feeling.NONE; + viewDistance = 4; CustomTilemap vis = new CustomFloor(); vis.setRect( 5, 0, 7, height - ROOM_TOP); @@ -148,7 +148,7 @@ public class LastLevel extends Level { @Override protected void createItems() { - drop( new Amulet(), pedestal ); + drop( new Amulet(), exit ); } @Override @@ -230,9 +230,22 @@ public class LastLevel extends Level { texture = Assets.HALLS_SP; } + private static final int[] CANDLES = new int[]{ + -1, 42, 46, 46, 46, 43, -1, + 42, 46, 46, 46, 46, 46, 43, + 46, 46, 45, 19, 44, 46, 46, + 46, 46, 19, 19, 19, 46, 46, + 46, 46, 43, 19, 42, 46, 46, + 44, 46, 46, 19, 46, 46, 45, + -1, 44, 45, 19, 44, 45, -1 + }; + @Override public Tilemap create() { Tilemap v = super.create(); + + int candlesStart = Dungeon.level.exit - 3 - 3*Dungeon.level.width(); + int cell = tileX + tileY * Dungeon.level.width(); int[] map = Dungeon.level.map; int[] data = new int[tileW*tileH]; @@ -240,13 +253,37 @@ public class LastLevel extends Level { if (i % tileW == 0){ cell = tileX + (tileY + i / tileW) * Dungeon.level.width(); } + if (cell == candlesStart){ + for (int candle : CANDLES) { + if (data[i] == 0) data[i] = candle; + + if (data[i] == 46 && DungeonTileSheet.tileVariance[cell] >= 50){ + data[i] ++; + } + + if (Statistics.amuletObtained && data[i] > 40){ + data[i] += 8; + } + + if (map[cell] != Terrain.CHASM && map[cell+Dungeon.level.width] == Terrain.CHASM) { + data[i+tileW] = 6; + } + + i++; + cell++; + if (i % tileW == 0){ + cell = tileX + (tileY + i / tileW) * Dungeon.level.width(); + } + } + } if (map[cell] == Terrain.EMPTY_DECO) { - data[i] = 27; + if (Statistics.amuletObtained){ + data[i] = 31; + } else { + data[i] = 27; + } } else if (map[cell] == Terrain.EMPTY) { data[i] = 19; - if (map[cell+Dungeon.level.width] == Terrain.CHASM) { - data[i+tileW] = 6; - } } else if (data[i] == 0) { data[i] = -1; } @@ -271,9 +308,9 @@ public class LastLevel extends Level { -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 8, 9, 10, 11, 19, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 16, 17, 18, 19, 19, 19, 20, 21, 22, 0, 0, 0, - 0, 0, 0, 0, 24, 25, 26, 27, 19, 27, 28, 29, 30, 0, 0, 0, + 0, 0, 0, 0, 24, 25, 26, 31, 19, 31, 28, 29, 30, 0, 0, 0, 0, 0, 0, 0, 24, 25, 26, 19, 19, 19, 28, 29, 30, 0, 0, 0, - 0, 0, 0, 0, 24, 25, 26, 27, 19, 27, 28, 29, 30, 0, 0, 0, + 0, 0, 0, 0, 24, 25, 26, 31, 19, 31, 28, 29, 30, 0, 0, 0, 0, 0, 0, 0, 24, 25, 34, 35, 35, 35, 34, 29, 30, 0, 0, 0, 0, 0, 0, 0, 40, 41, 36, 36, 36, 36, 36, 40, 41, 0, 0, 0, 0, 0, 0, 0, 48, 49, 36, 36, 36, 36, 36, 48, 49, 0, 0, 0, diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/NewHallsBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/NewHallsBossLevel.java index ab214c482..eca66c96e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/NewHallsBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/NewHallsBossLevel.java @@ -279,7 +279,7 @@ public class NewHallsBossLevel extends Level { } private static final int[] map = new int[]{ - 8, 9, 10, 11, 11, 11, 12, 13, 14, + 8, 9, 10, 11, 11, 11, 12, 13, 14, 16, 17, 18, 19, 19, 19, 20, 21, 22, 24, 25, 26, 27, 19, 27, 28, 29, 30, 24, 25, 26, 19, 19, 19, 28, 29, 30, @@ -301,6 +301,7 @@ public class NewHallsBossLevel extends Level { int[] data = map.clone(); if (Dungeon.level.map[Dungeon.level.exit] == Terrain.EXIT) { data[4] = 19; + data[21] = data[23] = data[39] = data[41] = 31; } vis.map(data, tileW); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/DemonSpawnerRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/DemonSpawnerRoom.java index fec1e261a..21ed00cf0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/DemonSpawnerRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/DemonSpawnerRoom.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DemonSpawner; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; @@ -74,7 +75,12 @@ public class DemonSpawnerRoom extends SpecialRoom { return false; } - private static class CustomFloor extends CustomTilemap { + @Override + public boolean canPlaceGrass(Point p) { + return false; + } + + public static class CustomFloor extends CustomTilemap { { texture = Assets.HALLS_SP; @@ -90,8 +96,19 @@ public class DemonSpawnerRoom extends SpecialRoom { if (i % tileW == 0){ cell = tileX + (tileY + i / tileW) * Dungeon.level.width(); } - if (map[cell] == Terrain.EMPTY_DECO) data[i] = 27; - else data[i] = 19; + + if (Dungeon.level.findMob(cell) instanceof DemonSpawner){ + data[i] = 5 + 4*8; + } else if (map[cell] == Terrain.EMPTY_DECO) { + if (Statistics.amuletObtained){ + data[i] = 31; + } else { + data[i] = 27; + } + } else { + data[i] = 19; + } + cell++; } v.map( data, tileW ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhoulSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhoulSprite.java index c29a243ef..e345f72a6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhoulSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhoulSprite.java @@ -38,9 +38,6 @@ public class GhoulSprite extends MobSprite { idle = new Animation( 2, true ); idle.frames( frames, 0, 0, 0, 1 ); - run = new Animation( 15, true ); - run.frames( frames, 0, 2, 3, 4 ); - run = new Animation( 12, true ); run.frames( frames, 2, 3, 4, 5, 6, 7 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RipperSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RipperSprite.java index 7e6a8a5e0..3ba57ac0c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RipperSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RipperSprite.java @@ -32,22 +32,25 @@ public class RipperSprite extends MobSprite { texture( Assets.RIPPER ); - TextureFilm frames = new TextureFilm( texture, 12, 15 ); + TextureFilm frames = new TextureFilm( texture, 12, 14 ); idle = new Animation( 2, true ); - idle.frames( frames, 0, 0, 0, 1, 0, 0, 1, 1 ); + idle.frames( frames, 0, 0, 0, 1 ); run = new Animation( 15, true ); run.frames( frames, 0, 2, 3, 4 ); - //TODO shoudl probably have 2 attack animations, like monks + run = new Animation( 18, true ); + run.frames( frames, 2, 3, 4, 5, 6, 7 ); + + //TODO should probably have 2 attack animations, like monks attack = new Animation( 12, false ); - attack.frames( frames, 0, 5, 6 ); + attack.frames( frames, 0, 8, 9 ); zap = attack.clone(); die = new Animation( 15, false ); - die.frames( frames, 0, 7, 8, 8, 9, 10 ); + die.frames( frames, 0, 10, 11, 12, 13 ); play( idle ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SpawnerSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SpawnerSprite.java index 80163e884..60cf2595a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SpawnerSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SpawnerSprite.java @@ -22,31 +22,66 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.effects.Splash; +import com.watabou.noosa.Game; import com.watabou.noosa.TextureFilm; +import com.watabou.utils.PointF; public class SpawnerSprite extends MobSprite { - //TODO just a recolored golem sprite atm + //TODO need to improve the base public SpawnerSprite() { super(); texture( Assets.SPAWNER ); + perspectiveRaise = 8 / 16f; + shadowOffset = 1.25f; + shadowHeight = 0.4f; + shadowWidth = 1f; + TextureFilm frames = new TextureFilm( texture, 16, 16 ); - idle = new Animation( 4, true ); - idle.frames( frames, 0, 1 ); + idle = new Animation( 6, true ); + idle.frames( frames, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ); - run = new Animation( 12, true ); - run.frames( frames, 2, 3, 4, 5 ); + run = idle.clone(); - attack = new Animation( 10, false ); - attack.frames( frames, 6, 7, 8 ); + attack = idle.clone(); - die = new Animation( 15, false ); - die.frames( frames, 9, 10, 11, 12, 13 ); + die = idle.clone(); play( idle ); } + private float baseY = Float.NaN; + + @Override + public void place(int cell) { + super.place(cell); + baseY = y; + } + + @Override + public void update() { + super.update(); + if (!paused){ + if (Float.isNaN(baseY)) baseY = y; + y = baseY + (float)(Math.sin(Game.timeTotal)/3f); + shadowOffset = 1.25f - 0.6f*(float)(Math.sin(Game.timeTotal)/3f); + } + } + + @Override + public void die() { + Splash.at( center(), blood(), 100 ); + killAndErase(); + } + + @Override + public void bloodBurstA(PointF from, int damage) { + if (alive) { + super.bloodBurstA(from, damage); + } + } }