v0.8.1: Fixed the following minor bugs:
- preparation incorrect killing enemies at health threshold, instead of below it - preparation incorrectly ignoring boss phases and death resistance effects - talisman of foresight vision marking effects incorrectly persisting between depths - packs filling past capacity in some cases - fireblast incorrectly setting adjacent cells on fire when not flammable - typos in the description of shields - game incorrectly closing when back button is pressed in new hero select - memory leaks on Android phones when the game is closed/opened - cursed wand gas zaps not using new SFX
This commit is contained in:
parent
4415dde0fa
commit
148fc96d91
|
@ -309,7 +309,13 @@ public abstract class Char extends Actor {
|
||||||
buff(FrostImbue.class).proc(enemy);
|
buff(FrostImbue.class).proc(enemy);
|
||||||
|
|
||||||
if (enemy.isAlive() && prep != null && prep.canKO(enemy)){
|
if (enemy.isAlive() && prep != null && prep.canKO(enemy)){
|
||||||
|
enemy.HP = 0;
|
||||||
|
if (!enemy.isAlive()) {
|
||||||
enemy.die(this);
|
enemy.die(this);
|
||||||
|
} else {
|
||||||
|
//helps with triggering any on-damage effects that need to activate
|
||||||
|
enemy.damage(-1, this);
|
||||||
|
}
|
||||||
enemy.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(Preparation.class, "assassinated"));
|
enemy.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(Preparation.class, "assassinated"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,9 +72,9 @@ public class Preparation extends Buff implements ActionIndicator.Action {
|
||||||
public boolean canKO(Char defender){
|
public boolean canKO(Char defender){
|
||||||
if (defender.properties().contains(Char.Property.MINIBOSS)
|
if (defender.properties().contains(Char.Property.MINIBOSS)
|
||||||
|| defender.properties().contains(Char.Property.BOSS)){
|
|| defender.properties().contains(Char.Property.BOSS)){
|
||||||
return (defender.HP/(float)defender.HT) <= (KOThreshold/5f);
|
return (defender.HP/(float)defender.HT) < (KOThreshold/5f);
|
||||||
} else {
|
} else {
|
||||||
return (defender.HP/(float)defender.HT) <= KOThreshold;
|
return (defender.HP/(float)defender.HT) < KOThreshold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -340,6 +340,7 @@ public class TalismanOfForesight extends Artifact {
|
||||||
public static class CharAwareness extends FlavourBuff {
|
public static class CharAwareness extends FlavourBuff {
|
||||||
|
|
||||||
public int charID;
|
public int charID;
|
||||||
|
public int depth = Dungeon.depth;
|
||||||
|
|
||||||
private static final String ID = "id";
|
private static final String ID = "id";
|
||||||
|
|
||||||
|
@ -367,8 +368,10 @@ public class TalismanOfForesight extends Artifact {
|
||||||
public static class HeapAwareness extends FlavourBuff {
|
public static class HeapAwareness extends FlavourBuff {
|
||||||
|
|
||||||
public int pos;
|
public int pos;
|
||||||
|
public int depth = Dungeon.depth;
|
||||||
|
|
||||||
private static final String POS = "pos";
|
private static final String POS = "pos";
|
||||||
|
private static final String DEPTH = "depth";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void detach() {
|
public void detach() {
|
||||||
|
@ -381,12 +384,14 @@ public class TalismanOfForesight extends Artifact {
|
||||||
public void restoreFromBundle(Bundle bundle) {
|
public void restoreFromBundle(Bundle bundle) {
|
||||||
super.restoreFromBundle(bundle);
|
super.restoreFromBundle(bundle);
|
||||||
pos = bundle.getInt(POS);
|
pos = bundle.getInt(POS);
|
||||||
|
depth = bundle.getInt(DEPTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void storeInBundle(Bundle bundle) {
|
public void storeInBundle(Bundle bundle) {
|
||||||
super.storeInBundle(bundle);
|
super.storeInBundle(bundle);
|
||||||
bundle.put(POS, pos);
|
bundle.put(POS, pos);
|
||||||
|
bundle.put(DEPTH, depth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ public class Bag extends Item implements Iterable<Item> {
|
||||||
public boolean canHold( Item item ){
|
public boolean canHold( Item item ){
|
||||||
if (items.contains(item) || item instanceof Bag || items.size() < capacity()){
|
if (items.contains(item) || item instanceof Bag || items.size() < capacity()){
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else if (item.stackable) {
|
||||||
for (Item i : items) {
|
for (Item i : items) {
|
||||||
if (item.isSimilar( i )) {
|
if (item.isSimilar( i )) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -171,6 +171,7 @@ public class CursedWand {
|
||||||
GameScene.add( Blob.seed( bolt.collisionPos, 200, ParalyticGas.class ) );
|
GameScene.add( Blob.seed( bolt.collisionPos, 200, ParalyticGas.class ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||||
afterZap.call();
|
afterZap.call();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -77,7 +77,10 @@ public class WandOfFireblast extends DamageWand {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//only ignite cells directly near caster if they are flammable
|
||||||
|
if (!Dungeon.level.adjacent(bolt.sourcePos, cell) || Dungeon.level.flamable[cell]){
|
||||||
GameScene.add( Blob.seed( cell, 1+chargesPerCast(), Fire.class ) );
|
GameScene.add( Blob.seed( cell, 1+chargesPerCast(), Fire.class ) );
|
||||||
|
}
|
||||||
|
|
||||||
Char ch = Actor.findChar( cell );
|
Char ch = Actor.findChar( cell );
|
||||||
if (ch != null) {
|
if (ch != null) {
|
||||||
|
|
|
@ -46,9 +46,9 @@ public class Greatshield extends MeleeWeapon {
|
||||||
|
|
||||||
public String statsInfo(){
|
public String statsInfo(){
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
return Messages.get(this, "stats_desc", 10+3*buffedLvl());
|
return Messages.get(this, "stats_desc", 6+3*buffedLvl());
|
||||||
} else {
|
} else {
|
||||||
return Messages.get(this, "typical_stats_desc", 10);
|
return Messages.get(this, "typical_stats_desc", 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,9 +50,9 @@ public class RoundShield extends MeleeWeapon {
|
||||||
|
|
||||||
public String statsInfo(){
|
public String statsInfo(){
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
return Messages.get(this, "stats_desc", 5+2*buffedLvl());
|
return Messages.get(this, "stats_desc", 4+2*buffedLvl());
|
||||||
} else {
|
} else {
|
||||||
return Messages.get(this, "typical_stats_desc", 5);
|
return Messages.get(this, "typical_stats_desc", 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1094,6 +1094,7 @@ public abstract class Level implements Bundlable {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (TalismanOfForesight.CharAwareness a : c.buffs(TalismanOfForesight.CharAwareness.class)){
|
for (TalismanOfForesight.CharAwareness a : c.buffs(TalismanOfForesight.CharAwareness.class)){
|
||||||
|
if (Dungeon.depth != a.depth) continue;
|
||||||
Char ch = (Char) Actor.findById(a.charID);
|
Char ch = (Char) Actor.findById(a.charID);
|
||||||
if (ch == null) {
|
if (ch == null) {
|
||||||
a.detach();
|
a.detach();
|
||||||
|
@ -1105,9 +1106,9 @@ public abstract class Level implements Bundlable {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (TalismanOfForesight.HeapAwareness h : c.buffs(TalismanOfForesight.HeapAwareness.class)){
|
for (TalismanOfForesight.HeapAwareness h : c.buffs(TalismanOfForesight.HeapAwareness.class)){
|
||||||
int p = h.pos;
|
if (Dungeon.depth != h.depth) continue;
|
||||||
for (int i : PathFinder.NEIGHBOURS9)
|
for (int i : PathFinder.NEIGHBOURS9)
|
||||||
fieldOfView[p+i] = true;
|
fieldOfView[h.pos+i] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Mob m : mobs){
|
for (Mob m : mobs){
|
||||||
|
|
|
@ -988,6 +988,9 @@ public class GameScene extends PixelScene {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void selectCell( CellSelector.Listener listener ) {
|
public static void selectCell( CellSelector.Listener listener ) {
|
||||||
|
if (cellSelector.listener != null && cellSelector.listener != defaultCellListener){
|
||||||
|
cellSelector.listener.onSelect(null);
|
||||||
|
}
|
||||||
cellSelector.listener = listener;
|
cellSelector.listener = listener;
|
||||||
if (scene != null)
|
if (scene != null)
|
||||||
scene.prompt( listener.prompt() );
|
scene.prompt( listener.prompt() );
|
||||||
|
|
|
@ -270,6 +270,11 @@ public class HeroSelectScene extends PixelScene {
|
||||||
uiAlpha = 2f;
|
uiAlpha = 2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onBackPressed() {
|
||||||
|
ShatteredPixelDungeon.switchScene( TitleScene.class );
|
||||||
|
}
|
||||||
|
|
||||||
private class HeroBtn extends StyledButton {
|
private class HeroBtn extends StyledButton {
|
||||||
|
|
||||||
private HeroClass cl;
|
private HeroClass cl;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user