diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 7d299e669..c97f5b452 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -1790,7 +1790,7 @@ actors.mobs.tormentedspirit.name=tormented spirit actors.mobs.tormentedspirit.desc=Tormented spirits are otherwise good-natured spirits that have been afflicted by a curse. So long as they are cursed they will attack just like a wraith, and are more powerful as well!\n\nIt may be possible to cleanse the curse by using the right item while next to the spirit. If the curse is lifted the spirit will surely be grateful... actors.mobs.tormentedspirit.thank_you=Thank you... -actors.mobs.vaultrat.desc=This rat has some behaviour changes to test out new vault enemy AI:\n_-_ Its movement can be 'heard' through walls\n_-_ It will wander along a pre-set patrol\n_-_ While wandering it has sharply reduced detection chance behind the direction it moves in.\n_-_ When it detects you it will 'investigate' before swapping to hunting. Investigating enemies move toward you but don't attack and are easier to lose behind doors and corners. +actors.mobs.vaultrat.desc=This rat has some behaviour changes to test out new vault enemy AI:\n_-_ Its movement can be 'heard' through walls\n_-_ It will wander along a pre-set patrol\n_-_ While wandering it has sharply reduced detection range behind the direction it moves in.\n_-_While sleeping its detection range is also reduced\n_-_ When it detects you it will 'investigate' before swapping to hunting. Investigating enemies move toward you but don't attack and are easier to lose behind doors and corners. actors.mobs.warlock.name=dwarf warlock actors.mobs.warlock.bolt_kill=The shadow bolt killed you... diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/VaultMob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/VaultMob.java index f2e87c781..1a3b6b2fd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/VaultMob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/VaultMob.java @@ -160,6 +160,7 @@ public class VaultMob extends Mob { } else { //reset this, representing the mob looking around in place previousPos = pos; + sprite.idle(); } } return wanderPos; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java index a8edffd60..c82008d79 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java @@ -251,6 +251,9 @@ public class WandOfBlastWave extends DamageWand { x = (pos % Dungeon.level.width()) * DungeonTilemap.SIZE + (DungeonTilemap.SIZE - width) / 2; y = (pos / Dungeon.level.width()) * DungeonTilemap.SIZE + (DungeonTilemap.SIZE - height) / 2; + resetColor(); + scale.set(0); + time = TIME_TO_FADE; this.size = size; } @@ -283,8 +286,6 @@ public class WandOfBlastWave extends DamageWand { b.reset(pos, radius); if (hardLight != -1){ b.hardlight(hardLight); - } else { - b.resetColor(); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/vault/VaultEnemyCenterRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/vault/VaultEnemyCenterRoom.java new file mode 100644 index 000000000..c15422e7a --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/vault/VaultEnemyCenterRoom.java @@ -0,0 +1,49 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.quest.vault; + +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.VaultRat; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom; +import com.watabou.utils.Point; + +public class VaultEnemyCenterRoom extends StandardRoom { + + @Override + public float[] sizeCatProbs() { + return new float[]{0, 1, 0}; + } + + @Override + public void paint(Level level) { + Painter.fill( level, this, Terrain.WALL ); + Painter.fill( level, this, 1 , Terrain.EMPTY ); + + Painter.fill( level, this, 2 , Terrain.WALL ); + Painter.fill( level, this, 3 , Terrain.EMPTY ); + Painter.drawLine( level, new Point(left+1, top+3), new Point(right-1, top+3), Terrain.EMPTY); + Painter.drawLine( level, new Point(left+1, bottom-3), new Point(right-1, bottom-3), Terrain.EMPTY); + Painter.drawLine( level, new Point(left+3, top+1), new Point(left+3, bottom-1), Terrain.EMPTY); + Painter.drawLine( level, new Point(right-3, top+1), new Point(right-3, bottom-1), Terrain.EMPTY); + //TODO maybe better without corner pillars? they sorta just bait you... + // Need to think a little more about layout here + + for (Door door : connected.values()) { + door.set( Door.Type.REGULAR ); + } + + VaultRat rat = new VaultRat(); + do { + rat.pos = level.pointToCell(center()); + } while (level.solid[rat.pos]); + rat.state = rat.WANDERING; + level.mobs.add(rat); + + } + + @Override + public boolean canMerge(Level l, Room other, Point p, int mergeTerrain) { + return false; + } +}