v0.8.1: Fixed the following bugs:

- Memory leaks and other errors when using split-screen on Android
- Tengu cleansing doomed debuff between first and second phase
- Equip drops from enemies not graduating in rarity as intended
- Gasses being examinable when not visible
This commit is contained in:
Evan Debenham 2020-06-23 18:25:26 -04:00
parent 804a6a88a9
commit 5594172a41
9 changed files with 32 additions and 10 deletions

View File

@ -22,6 +22,7 @@
android:label="${appName}"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:resizeableActivity="true"
android:launchMode="singleInstance"
android:allowBackup="true"
android:fullBackupOnly="true"
android:backupAgent=".AndroidBackupHandler">

View File

@ -42,7 +42,7 @@ public class AndroidGame extends AndroidApplication {
public static AndroidApplication instance;
protected static GLSurfaceView view;
private AndroidPlatformSupport support;
private static AndroidPlatformSupport support;
@Override
protected void onCreate (Bundle savedInstanceState) {
@ -92,7 +92,8 @@ public class AndroidGame extends AndroidApplication {
config.useCompass = false;
config.useAccelerometer = false;
support = new AndroidPlatformSupport();
if (support == null) support = new AndroidPlatformSupport();
else support.resetGenerators();
support.updateSystemUI();

View File

@ -81,6 +81,7 @@ public class DM200 extends Mob {
}
protected Item createLoot() {
Dungeon.LimitedDrops.DM200_EQUIP.count++;
//uses probability tables for dwarf city
if (loot == Generator.Category.WEAPON){
return Generator.randomWeapon(4);

View File

@ -82,6 +82,7 @@ public class Golem extends Mob {
}
protected Item createLoot() {
Dungeon.LimitedDrops.GOLEM_EQUIP.count++;
//uses probability tables for demon halls
if (loot == Generator.Category.WEAPON){
return Generator.randomWeapon(5);

View File

@ -135,6 +135,12 @@ public class Guard extends Mob {
super.rollToDropLoot();
}
@Override
protected Item createLoot() {
Dungeon.LimitedDrops.GUARD_ARM.count++;
return super.createLoot();
}
private final String CHAINSUSED = "chainsused";
@Override

View File

@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
@ -121,7 +122,7 @@ public class NewTengu extends Mob {
//Tengu is immune to debuffs and damage when removed from the level
@Override
public void add(Buff buff) {
if (Actor.chars().contains(this)){
if (Actor.chars().contains(this) || buff instanceof Doom){
super.add(buff);
}
}

View File

@ -96,6 +96,12 @@ public class Skeleton extends Mob {
super.rollToDropLoot();
}
@Override
protected Item createLoot() {
Dungeon.LimitedDrops.SKELE_WEP.count++;
return super.createLoot();
}
@Override
public int attackSkill( Char target ) {
return 12;

View File

@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Regrowth;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StormCloud;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewTengu;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
@ -398,10 +399,12 @@ public class NewPrisonBossLevel extends Level {
setMapPause();
cleanMapState();
Doom d = tengu.buff(Doom.class);
Actor.remove(tengu);
mobs.remove(tengu);
TargetHealthIndicator.instance.target(null);
tengu.sprite.kill();
if (d != null) tengu.add(d);
GameScene.flash(0xFFFFFF);
Sample.INSTANCE.play(Assets.Sounds.BLAST);

View File

@ -106,12 +106,14 @@ public class WndInfoCell extends Window {
RenderedTextBlock info = PixelScene.renderTextBlock(6);
add(info);
for (Blob blob:Dungeon.level.blobs.values()) {
if (blob.volume > 0 && blob.cur[cell] > 0 && blob.tileDesc() != null) {
if (desc.length() > 0) {
desc += "\n\n";
if (Dungeon.level.heroFOV[cell]) {
for (Blob blob : Dungeon.level.blobs.values()) {
if (blob.volume > 0 && blob.cur[cell] > 0 && blob.tileDesc() != null) {
if (desc.length() > 0) {
desc += "\n\n";
}
desc += blob.tileDesc();
}
desc += blob.tileDesc();
}
}