v0.8.2: Various bugfixes:
- Added a safety check to AndroidGame - fixed Burning not checking if a thieve's item is null - fixed wand of regrowth overriding tall grass and placing grass where it shouldn't - fixed unique potions being vulnerable to explosions - fixed tengu placing traps over plants - fixed items not being IDed in rankings if players dies with an ankh
This commit is contained in:
parent
d62cb4aa95
commit
462b1027cc
|
@ -107,7 +107,12 @@ public class AndroidGame extends AndroidApplication {
|
||||||
view = (GLSurfaceView)graphics.getView();
|
view = (GLSurfaceView)graphics.getView();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
//do nothing, game should catch all back presses
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onWindowFocusChanged(boolean hasFocus) {
|
public void onWindowFocusChanged(boolean hasFocus) {
|
||||||
super.onWindowFocusChanged(hasFocus);
|
super.onWindowFocusChanged(hasFocus);
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class Burning extends Buff implements Hero.Doom {
|
||||||
target.damage( damage, this );
|
target.damage( damage, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target instanceof Thief) {
|
if (target instanceof Thief && ((Thief) target).item != null) {
|
||||||
|
|
||||||
Item item = ((Thief) target).item;
|
Item item = ((Thief) target).item;
|
||||||
|
|
||||||
|
|
|
@ -257,6 +257,11 @@ public class Heap implements Bundlable {
|
||||||
|
|
||||||
for (Item item : items.toArray( new Item[0] )) {
|
for (Item item : items.toArray( new Item[0] )) {
|
||||||
|
|
||||||
|
//unique items aren't affect by explosions
|
||||||
|
if (item.unique || (item instanceof Armor && ((Armor) item).checkSeal() != null)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (item instanceof Potion) {
|
if (item instanceof Potion) {
|
||||||
items.remove(item);
|
items.remove(item);
|
||||||
((Potion) item).shatter(pos);
|
((Potion) item).shatter(pos);
|
||||||
|
@ -273,10 +278,10 @@ public class Heap implements Bundlable {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//unique and upgraded items can endure the blast
|
//upgraded items can endure the blast
|
||||||
} else if (!(item.level() > 0 || item.unique
|
} else if (item.level() <= 0) {
|
||||||
|| (item instanceof Armor && ((Armor) item).checkSeal() != null)))
|
|
||||||
items.remove( item );
|
items.remove( item );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,9 +98,15 @@ public class WandOfRegrowth extends Wand {
|
||||||
terr == Terrain.HIGH_GRASS ||
|
terr == Terrain.HIGH_GRASS ||
|
||||||
terr == Terrain.FURROWED_GRASS)) {
|
terr == Terrain.FURROWED_GRASS)) {
|
||||||
i.remove();
|
i.remove();
|
||||||
|
} else if (Char.hasProp(Actor.findChar(cell), Char.Property.IMMOVABLE)) {
|
||||||
|
i.remove();
|
||||||
|
} else if (Dungeon.level.plants.get(cell) != null){
|
||||||
|
i.remove();
|
||||||
} else {
|
} else {
|
||||||
Level.set( cell, Terrain.GRASS );
|
if (terr != Terrain.HIGH_GRASS && terr != Terrain.FURROWED_GRASS) {
|
||||||
GameScene.updateMap( cell );
|
Level.set(cell, Terrain.GRASS);
|
||||||
|
GameScene.updateMap( cell );
|
||||||
|
}
|
||||||
Char ch = Actor.findChar(cell);
|
Char ch = Actor.findChar(cell);
|
||||||
if (ch != null){
|
if (ch != null){
|
||||||
processSoulMark(ch, chargesPerCast());
|
processSoulMark(ch, chargesPerCast());
|
||||||
|
@ -162,6 +168,8 @@ public class WandOfRegrowth extends Wand {
|
||||||
for (int cell : cells){
|
for (int cell : cells){
|
||||||
if (grassToPlace <= 0 || bolt.path.contains(cell)) break;
|
if (grassToPlace <= 0 || bolt.path.contains(cell)) break;
|
||||||
|
|
||||||
|
if (Dungeon.level.map[cell] == Terrain.HIGH_GRASS) continue;
|
||||||
|
|
||||||
if (Random.Float() > furrowedChance) {
|
if (Random.Float() > furrowedChance) {
|
||||||
Level.set(cell, Terrain.HIGH_GRASS);
|
Level.set(cell, Terrain.HIGH_GRASS);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -582,6 +582,7 @@ public class NewPrisonBossLevel extends Level {
|
||||||
int cell = x+tenguCell.left+1 + (y+tenguCell.top+1)*width();
|
int cell = x+tenguCell.left+1 + (y+tenguCell.top+1)*width();
|
||||||
if (Blob.volumeAt(cell, StormCloud.class) == 0
|
if (Blob.volumeAt(cell, StormCloud.class) == 0
|
||||||
&& Blob.volumeAt(cell, Regrowth.class) <= 9
|
&& Blob.volumeAt(cell, Regrowth.class) <= 9
|
||||||
|
&& Dungeon.level.plants.get(cell) == null
|
||||||
&& Actor.findChar(cell) == null) {
|
&& Actor.findChar(cell) == null) {
|
||||||
Level.set(cell, Terrain.SECRET_TRAP);
|
Level.set(cell, Terrain.SECRET_TRAP);
|
||||||
setTrap(new TenguDartTrap().hide(), cell);
|
setTrap(new TenguDartTrap().hide(), cell);
|
||||||
|
|
|
@ -79,9 +79,9 @@ public class WndResurrect extends Window {
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
hide();
|
hide();
|
||||||
|
|
||||||
Rankings.INSTANCE.submit( false, WndResurrect.causeOfDeath.getClass() );
|
|
||||||
Hero.reallyDie( WndResurrect.causeOfDeath );
|
Hero.reallyDie( WndResurrect.causeOfDeath );
|
||||||
|
Rankings.INSTANCE.submit( false, WndResurrect.causeOfDeath.getClass() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
btnNo.setRect( 0, btnYes.bottom() + GAP, WIDTH, BTN_HEIGHT );
|
btnNo.setRect( 0, btnYes.bottom() + GAP, WIDTH, BTN_HEIGHT );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user