v0.8.0: fixes:

- fixed brutes dieing twice when falling into pits
- fixed rare crash bugs involving spinners
- fixed position swapping errors when the hero is affected by vertigo
- fixed crash bugs involving multiplicity
- fixed sprite errors with armored statues
This commit is contained in:
Evan Debenham 2019-12-16 18:12:40 -05:00
parent 7e58854147
commit 6dc0235aa6
6 changed files with 22 additions and 10 deletions

View File

@ -140,7 +140,7 @@ public abstract class Char extends Actor {
}
public boolean canInteract( Hero h ){
return Dungeon.level.adjacent( pos, h.pos );
return Dungeon.level.adjacent( pos, h.pos ) && h.buff(Vertigo.class) == null;
}
//swaps places by default

View File

@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ShieldBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.BruteSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
@ -68,6 +69,15 @@ public class Brute extends Mob {
return Random.NormalIntRange(0, 8);
}
@Override
public void die(Object cause) {
super.die(cause);
if (cause == Chasm.class){
hasRaged = true; //don't let enrage trigger for chasm deaths
}
}
@Override
public boolean isAlive() {
if (HP > 0){

View File

@ -638,10 +638,10 @@ public abstract class Mob extends Char {
if (bonus != null && !bonus.isEmpty()) {
for (Item b : bonus) Dungeon.level.drop(b, pos).sprite.drop();
if (RingOfWealth.latestDropWasRare){
if (sprite != null) new Flare(8, 48).color(0xAA00FF, true).show(sprite, 3f);
new Flare(8, 48).color(0xAA00FF, true).show(sprite, 3f);
RingOfWealth.latestDropWasRare = false;
} else {
if (sprite != null) new Flare(8, 24).color(0xFFFFFF, true).show(sprite, 3f);
new Flare(8, 24).color(0xFFFFFF, true).show(sprite, 3f);
}
}
}

View File

@ -193,9 +193,10 @@ public class Spinner extends Mob {
if (Dungeon.level.passable[rightPos])GameScene.add(Blob.seed(rightPos, 20, Web.class));
webCoolDown = 10;
}
if (Dungeon.level.heroFOV[enemy.pos]){
Dungeon.hero.interrupt();
if (Dungeon.level.heroFOV[enemy.pos]){
Dungeon.hero.interrupt();
}
}
next();
}

View File

@ -98,9 +98,10 @@ public class Multiplicity extends Armor.Glyph {
if (m != null) {
if (Char.hasProp(m, Char.Property.LARGE)){
for ( int i : spawnPoints){
for ( int i : spawnPoints.toArray(new Integer[0])){
if (!Dungeon.level.openSpace[i]){
spawnPoints.remove(i);
//remove the value, not at the index
spawnPoints.remove((Integer) i);
}
}
}

View File

@ -49,7 +49,7 @@ public class StatueSprite extends MobSprite {
play( idle );
}
private static int[] tierFrames = {0, 21, 32, 43, 54, 63};
private static int[] tierFrames = {0, 21, 32, 43, 54, 65};
public void setArmor( int tier ){
int c = tierFrames[(int)GameMath.gate(0, tier, 5)];