v0.8.1: fixes:
- fixed audio issues with DM-200/Dm-300 - fixed summoning traps failing to summon anything in some cases - fixed DM-300 being able to drill out of its arena in rare cases
This commit is contained in:
parent
82d33c9a4d
commit
a0ff6dcb75
|
@ -130,7 +130,6 @@ public class DM200 extends Mob {
|
||||||
}
|
}
|
||||||
|
|
||||||
GLog.w(Messages.get(this, "vent"));
|
GLog.w(Messages.get(this, "vent"));
|
||||||
Sample.INSTANCE.play(Assets.Sounds.GAS);
|
|
||||||
GameScene.add(Blob.seed(trajectory.collisionPos, 100, ToxicGas.class));
|
GameScene.add(Blob.seed(trajectory.collisionPos, 100, ToxicGas.class));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,9 @@ import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.GameMath;
|
import com.watabou.utils.GameMath;
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
|
import com.watabou.utils.Point;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
import com.watabou.utils.Rect;
|
||||||
import com.watabou.utils.RectF;
|
import com.watabou.utils.RectF;
|
||||||
|
|
||||||
public class NewDM300 extends Mob {
|
public class NewDM300 extends Mob {
|
||||||
|
@ -202,7 +204,7 @@ public class NewDM300 extends Mob {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
ventGas(enemy);
|
ventGas(enemy);
|
||||||
Sample.INSTANCE.play(Assets.Sounds.PUFF);
|
Sample.INSTANCE.play(Assets.Sounds.GAS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +239,7 @@ public class NewDM300 extends Mob {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
ventGas(enemy);
|
ventGas(enemy);
|
||||||
Sample.INSTANCE.play(Assets.Sounds.PUFF);
|
Sample.INSTANCE.play(Assets.Sounds.GAS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -247,7 +249,7 @@ public class NewDM300 extends Mob {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
dropRocks(enemy);
|
dropRocks(enemy);
|
||||||
Sample.INSTANCE.play(Assets.Sounds.PUFF);
|
Sample.INSTANCE.play(Assets.Sounds.ROCKS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -354,8 +356,6 @@ public class NewDM300 extends Mob {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Sample.INSTANCE.play(Assets.Sounds.GAS);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSlamComplete(){
|
public void onSlamComplete(){
|
||||||
|
@ -551,8 +551,13 @@ public class NewDM300 extends Mob {
|
||||||
if (bestpos != pos){
|
if (bestpos != pos){
|
||||||
Sample.INSTANCE.play( Assets.Sounds.ROCKS );
|
Sample.INSTANCE.play( Assets.Sounds.ROCKS );
|
||||||
|
|
||||||
|
Rect gate = NewCavesBossLevel.gate;
|
||||||
for (int i : PathFinder.NEIGHBOURS9){
|
for (int i : PathFinder.NEIGHBOURS9){
|
||||||
if (Dungeon.level.map[pos+i] == Terrain.WALL || Dungeon.level.map[pos+i] == Terrain.WALL_DECO){
|
if (Dungeon.level.map[pos+i] == Terrain.WALL || Dungeon.level.map[pos+i] == Terrain.WALL_DECO){
|
||||||
|
Point p = Dungeon.level.cellToPoint(pos+i);
|
||||||
|
if (p.y < gate.bottom && p.x > gate.left-2 && p.x < gate.right+2){
|
||||||
|
continue; //don't break the gate or walls around the gate
|
||||||
|
}
|
||||||
Level.set(pos+i, Terrain.EMPTY_DECO);
|
Level.set(pos+i, Terrain.EMPTY_DECO);
|
||||||
GameScene.updateMap(pos+i);
|
GameScene.updateMap(pos+i);
|
||||||
}
|
}
|
||||||
|
@ -561,8 +566,9 @@ public class NewDM300 extends Mob {
|
||||||
Dungeon.observe();
|
Dungeon.observe();
|
||||||
spend(3f);
|
spend(3f);
|
||||||
|
|
||||||
|
bestpos = pos;
|
||||||
for (int i : PathFinder.NEIGHBOURS8){
|
for (int i : PathFinder.NEIGHBOURS8){
|
||||||
if (Actor.findChar(pos+i) == null &&
|
if (Actor.findChar(pos+i) == null && Dungeon.level.openSpace[pos+i] &&
|
||||||
Dungeon.level.trueDistance(bestpos, target) > Dungeon.level.trueDistance(pos+i, target)){
|
Dungeon.level.trueDistance(bestpos, target) > Dungeon.level.trueDistance(pos+i, target)){
|
||||||
bestpos = pos+i;
|
bestpos = pos+i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,16 +92,6 @@ public class NewCavesBossLevel extends Level {
|
||||||
|
|
||||||
setSize(WIDTH, HEIGHT);
|
setSize(WIDTH, HEIGHT);
|
||||||
|
|
||||||
//fill in special floor, statues, and exits
|
|
||||||
Painter.fill(this, 15, 2, 3, 3, Terrain.EMPTY_SP);
|
|
||||||
Painter.fill(this, 15, 5, 3, 1, Terrain.STATUE);
|
|
||||||
Painter.fill(this, 15, 7, 3, 1, Terrain.STATUE);
|
|
||||||
Painter.fill(this, 15, 9, 3, 1, Terrain.STATUE);
|
|
||||||
Painter.fill(this, 16, 5, 1, 6, Terrain.EMPTY_SP);
|
|
||||||
Painter.fill(this, 15, 0, 3, 3, Terrain.EXIT);
|
|
||||||
|
|
||||||
exit = 16 + 2*width();
|
|
||||||
|
|
||||||
//These signs are visually overridden with custom tile visuals
|
//These signs are visually overridden with custom tile visuals
|
||||||
Painter.fill(this, gate, Terrain.SIGN);
|
Painter.fill(this, gate, Terrain.SIGN);
|
||||||
|
|
||||||
|
@ -132,6 +122,16 @@ public class NewCavesBossLevel extends Level {
|
||||||
Painter.fill(this, 13, 10, 7, 1, Terrain.CHASM);
|
Painter.fill(this, 13, 10, 7, 1, Terrain.CHASM);
|
||||||
Painter.fill(this, 14, 3, 5, 10, Terrain.EMPTY);
|
Painter.fill(this, 14, 3, 5, 10, Terrain.EMPTY);
|
||||||
|
|
||||||
|
//fill in special floor, statues, and exits
|
||||||
|
Painter.fill(this, 15, 2, 3, 3, Terrain.EMPTY_SP);
|
||||||
|
Painter.fill(this, 15, 5, 3, 1, Terrain.STATUE);
|
||||||
|
Painter.fill(this, 15, 7, 3, 1, Terrain.STATUE);
|
||||||
|
Painter.fill(this, 15, 9, 3, 1, Terrain.STATUE);
|
||||||
|
Painter.fill(this, 16, 5, 1, 6, Terrain.EMPTY_SP);
|
||||||
|
Painter.fill(this, 15, 0, 3, 3, Terrain.EXIT);
|
||||||
|
|
||||||
|
exit = 16 + 2*width();
|
||||||
|
|
||||||
CustomTilemap customVisuals = new CityEntrance();
|
CustomTilemap customVisuals = new CityEntrance();
|
||||||
customVisuals.setRect(0, 0, width(), 11);
|
customVisuals.setRect(0, 0, width(), 11);
|
||||||
customTiles.add(customVisuals);
|
customTiles.add(customVisuals);
|
||||||
|
|
|
@ -74,8 +74,8 @@ public class SummoningTrap extends Trap {
|
||||||
|
|
||||||
for (Integer point : respawnPoints) {
|
for (Integer point : respawnPoints) {
|
||||||
Mob mob = Dungeon.level.createMob();
|
Mob mob = Dungeon.level.createMob();
|
||||||
if (Char.hasProp(mob, Char.Property.LARGE) && !Dungeon.level.openSpace[point]){
|
while (Char.hasProp(mob, Char.Property.LARGE) && !Dungeon.level.openSpace[point]){
|
||||||
continue;
|
mob = Dungeon.level.createMob();
|
||||||
}
|
}
|
||||||
if (mob != null) {
|
if (mob != null) {
|
||||||
mob.state = mob.WANDERING;
|
mob.state = mob.WANDERING;
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class DM200Sprite extends MobSprite {
|
||||||
((DM200)ch).onZapComplete();
|
((DM200)ch).onZapComplete();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
Sample.INSTANCE.play( Assets.Sounds.PUFF );
|
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user