v0.8.0: Visual improvements, primarily to demon halls area/enemies
This commit is contained in:
parent
6441f2fd5e
commit
124172b6ad
Binary file not shown.
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 532 B |
Binary file not shown.
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 555 B |
Binary file not shown.
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 5.4 KiB |
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user