v0.9.1b: fixed Tengu's adjusted bomb logic affecting all tiles
This commit is contained in:
parent
d89533b9de
commit
23241a6af1
|
@ -590,25 +590,27 @@ public class NewTengu extends Mob {
|
||||||
PathFinder.buildDistanceMap( bombPos, BArray.not( Dungeon.level.solid, null ), 2 );
|
PathFinder.buildDistanceMap( bombPos, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||||
for (int cell = 0; cell < PathFinder.distance.length; cell++) {
|
for (int cell = 0; cell < PathFinder.distance.length; cell++) {
|
||||||
|
|
||||||
Char ch = Actor.findChar(cell);
|
if (PathFinder.distance[cell] < Integer.MAX_VALUE) {
|
||||||
if (ch != null && !(ch instanceof NewTengu)){
|
Char ch = Actor.findChar(cell);
|
||||||
int dmg = Random.NormalIntRange(5 + Dungeon.depth, 10 + Dungeon.depth*2);
|
if (ch != null && !(ch instanceof NewTengu)) {
|
||||||
dmg -= ch.drRoll();
|
int dmg = Random.NormalIntRange(5 + Dungeon.depth, 10 + Dungeon.depth * 2);
|
||||||
|
dmg -= ch.drRoll();
|
||||||
|
|
||||||
if (dmg > 0) {
|
if (dmg > 0) {
|
||||||
ch.damage(dmg, Bomb.class);
|
ch.damage(dmg, Bomb.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ch == Dungeon.hero && !ch.isAlive()) {
|
||||||
|
Dungeon.fail(NewTengu.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ch == Dungeon.hero && !ch.isAlive()) {
|
Heap h = Dungeon.level.heaps.get(cell);
|
||||||
Dungeon.fail(NewTengu.class);
|
if (h != null) {
|
||||||
}
|
for (Item i : h.items.toArray(new Item[0])) {
|
||||||
}
|
if (i instanceof BombItem) {
|
||||||
|
h.remove(i);
|
||||||
Heap h = Dungeon.level.heaps.get(cell);
|
}
|
||||||
if (h != null){
|
|
||||||
for (Item i : h.items.toArray(new Item[0])){
|
|
||||||
if (i instanceof BombItem){
|
|
||||||
h.remove(i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user