v2.2.0: added a new custom decoration tile type (replaces signs)
This commit is contained in:
@@ -79,7 +79,7 @@ public class CavesBossLevel extends Level {
|
||||
if (locked){
|
||||
Music.INSTANCE.play(Assets.Music.CAVES_BOSS, true);
|
||||
//if wall isn't broken
|
||||
} else if (map[14 + 13*width()] == Terrain.SIGN){
|
||||
} else if (map[14 + 13*width()] == Terrain.CUSTOM_DECO){
|
||||
Music.INSTANCE.end();
|
||||
} else {
|
||||
Music.INSTANCE.playTracks(
|
||||
@@ -114,8 +114,7 @@ public class CavesBossLevel extends Level {
|
||||
|
||||
setSize(WIDTH, HEIGHT);
|
||||
|
||||
//These signs are visually overridden with custom tile visuals
|
||||
Painter.fill(this, gate, Terrain.SIGN);
|
||||
Painter.fill(this, gate, Terrain.CUSTOM_DECO);
|
||||
|
||||
//set up main boss arena
|
||||
Painter.fillEllipse(this, mainArena, Terrain.EMPTY);
|
||||
@@ -365,7 +364,7 @@ public class CavesBossLevel extends Level {
|
||||
}
|
||||
|
||||
for( int i = (mainArena.top-1)*width; i <length; i++){
|
||||
if (map[i] == Terrain.INACTIVE_TRAP || map[i] == Terrain.WATER || map[i] == Terrain.SIGN){
|
||||
if (map[i] == Terrain.INACTIVE_TRAP || map[i] == Terrain.WATER || map[i] == Terrain.CUSTOM_DECO){
|
||||
GameScene.add(Blob.seed(i, 1, PylonEnergy.class));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class CityBossLevel extends Level {
|
||||
Painter.fillDiamond(this, arena, 1, Terrain.EMPTY);
|
||||
|
||||
Painter.fill(this, arena, 5, Terrain.EMPTY_SP);
|
||||
Painter.fill(this, arena, 6, Terrain.SIGN);
|
||||
Painter.fill(this, arena, 6, Terrain.CUSTOM_DECO);
|
||||
|
||||
c = arena.center();
|
||||
Painter.set(this, c.x-3, c.y, Terrain.STATUE);
|
||||
@@ -513,13 +513,13 @@ public class CityBossLevel extends Level {
|
||||
data[++i] = 13 * 8 + 2;
|
||||
data[++i] = 13 * 8 + 3;
|
||||
|
||||
//mid row of DK's throne
|
||||
}else if (map[i + 1] == Terrain.SIGN) {
|
||||
//mid row of DK's throne
|
||||
}else if (map[i + 1] == Terrain.CUSTOM_DECO) {
|
||||
data[i] = 14 * 8 + 1;
|
||||
data[++i] = 14 * 8 + 2;
|
||||
data[++i] = 14 * 8 + 3;
|
||||
|
||||
//bottom row of DK's throne
|
||||
//bottom row of DK's throne
|
||||
} else if (map[i+1] == Terrain.EMPTY_SP && map[i-tileW] == Terrain.EMPTY_SP){
|
||||
data[i] = 15*8 + 1;
|
||||
data[++i] = 15*8 + 2;
|
||||
@@ -556,7 +556,7 @@ public class CityBossLevel extends Level {
|
||||
|
||||
//DK arena tiles
|
||||
} else {
|
||||
if (Dungeon.level.map[cell] == Terrain.SIGN){
|
||||
if (Dungeon.level.map[cell] == Terrain.CUSTOM_DECO){
|
||||
return Messages.get(CityBossLevel.class, "throne_name");
|
||||
} else if (Dungeon.level.map[cell] == Terrain.PEDESTAL){
|
||||
return Messages.get(CityBossLevel.class, "summoning_name");
|
||||
@@ -582,7 +582,7 @@ public class CityBossLevel extends Level {
|
||||
|
||||
//DK arena tiles
|
||||
} else {
|
||||
if (Dungeon.level.map[cell] == Terrain.SIGN){
|
||||
if (Dungeon.level.map[cell] == Terrain.CUSTOM_DECO){
|
||||
return Messages.get(CityBossLevel.class, "throne_desc");
|
||||
} else if (Dungeon.level.map[cell] == Terrain.PEDESTAL){
|
||||
return Messages.get(CityBossLevel.class, "summoning_desc");
|
||||
@@ -658,7 +658,7 @@ public class CityBossLevel extends Level {
|
||||
//Statues that need to face left instead of right
|
||||
if (map[i] == Terrain.STATUE && i%tileW > 7){
|
||||
data[i-tileW] = 14*8 + 4;
|
||||
} else if (map[i] == Terrain.SIGN){
|
||||
} else if (map[i] == Terrain.CUSTOM_DECO){
|
||||
data[i-tileW] = 13*8 + 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,13 +50,15 @@ public class Terrain {
|
||||
public static final int EMPTY_DECO = 20;
|
||||
public static final int LOCKED_EXIT = 21;
|
||||
public static final int UNLOCKED_EXIT = 22;
|
||||
public static final int SIGN = 23; //currently used purely for custom tile visuals
|
||||
public static final int WELL = 24;
|
||||
public static final int STATUE = 25;
|
||||
public static final int STATUE_SP = 26;
|
||||
public static final int BOOKSHELF = 27;
|
||||
public static final int ALCHEMY = 28;
|
||||
|
||||
//solid environment decorations
|
||||
public static final int CUSTOM_DECO = 23; //invisible decoration that will also be a custom visual, re-uses the old terrain ID for signs
|
||||
public static final int STATUE = 25;
|
||||
public static final int STATUE_SP = 26;
|
||||
|
||||
public static final int WATER = 29;
|
||||
|
||||
public static final int PASSABLE = 0x01;
|
||||
@@ -98,13 +100,14 @@ public class Terrain {
|
||||
flags[EMPTY_DECO] = flags[EMPTY];
|
||||
flags[LOCKED_EXIT] = SOLID;
|
||||
flags[UNLOCKED_EXIT]= PASSABLE;
|
||||
flags[SIGN] = SOLID; //Currently these are unused except for visual tile overrides where we want terrain to be solid with no other properties
|
||||
flags[WELL] = AVOID;
|
||||
flags[STATUE] = SOLID;
|
||||
flags[STATUE_SP] = flags[STATUE];
|
||||
flags[BOOKSHELF] = flags[BARRICADE];
|
||||
flags[ALCHEMY] = SOLID;
|
||||
|
||||
flags[CUSTOM_DECO] = SOLID;
|
||||
flags[STATUE] = SOLID;
|
||||
flags[STATUE_SP] = flags[STATUE];
|
||||
|
||||
}
|
||||
|
||||
public static int discover( int terr ) {
|
||||
|
||||
@@ -86,7 +86,7 @@ public class DungeonTileSheet {
|
||||
chasmStitcheable.put( Terrain.HIGH_GRASS, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.FURROWED_GRASS,CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.EMPTY_DECO, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.SIGN, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.CUSTOM_DECO, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.EMPTY_WELL, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.WELL, CHASM_FLOOR );
|
||||
chasmStitcheable.put( Terrain.STATUE, CHASM_FLOOR );
|
||||
@@ -131,7 +131,7 @@ public class DungeonTileSheet {
|
||||
Terrain.ENTRANCE, Terrain.EXIT, Terrain.EMBERS,
|
||||
Terrain.BARRICADE, Terrain.HIGH_GRASS, Terrain.FURROWED_GRASS, Terrain.SECRET_TRAP,
|
||||
Terrain.TRAP, Terrain.INACTIVE_TRAP, Terrain.EMPTY_DECO,
|
||||
Terrain.SIGN, Terrain.WELL, Terrain.STATUE, Terrain.ALCHEMY,
|
||||
Terrain.CUSTOM_DECO, Terrain.WELL, Terrain.STATUE, Terrain.ALCHEMY,
|
||||
Terrain.DOOR, Terrain.OPEN_DOOR, Terrain.LOCKED_DOOR, Terrain.CRYSTAL_DOOR
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user