v0.8.0: fixes/tweaks:

- DM-300 is now immune to sleep
- Pylons now knock away items ontop of them
- fixed further rare DM-300 crash issues
This commit is contained in:
Evan Debenham 2020-01-20 13:42:51 -05:00
parent 2673220c79
commit 633e3d3db5
3 changed files with 18 additions and 0 deletions

View File

@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep;
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
@ -535,6 +536,10 @@ public class NewDM300 extends Mob {
return desc; return desc;
} }
{
immunities.add(Sleep.class);
}
public static class FallingRocks extends Blob { public static class FallingRocks extends Blob {
{ {

View File

@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning; import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.levels.NewCavesBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.NewCavesBossLevel;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
@ -71,6 +72,15 @@ public class Pylon extends Mob {
protected boolean act() { protected boolean act() {
spend(TICK); spend(TICK);
Heap heap = Dungeon.level.heaps.get( pos );
if (heap != null) {
int n;
do {
n = pos + PathFinder.NEIGHBOURS8[Random.Int( 8 )];
} while (!Dungeon.level.passable[n] && !Dungeon.level.avoid[n]);
Dungeon.level.drop( heap.pickUp(), n ).sprite.drop( pos );
}
if (alignment == Alignment.NEUTRAL){ if (alignment == Alignment.NEUTRAL){
return true; return true;
} }

View File

@ -753,6 +753,9 @@ public class NewCavesBossLevel extends Level {
energySourceSprite = c.sprite; energySourceSprite = c.sprite;
} }
} }
if (energySourceSprite == null){
return;
}
} }
float dist = Math.abs(energySourceSprite.x - x) + Math.abs(energySourceSprite.y - y); float dist = Math.abs(energySourceSprite.x - x) + Math.abs(energySourceSprite.y - y);