diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java index 4395145a3..a59cf8f23 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java @@ -23,6 +23,11 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; @@ -65,7 +70,7 @@ public class DemonSpawner extends Mob { if (spawnCooldown <= 0){ ArrayList<Integer> candidates = new ArrayList<>(); for (int n : PathFinder.NEIGHBOURS8) { - if (!Dungeon.level.solid[pos+n] && Actor.findChar( pos+n ) == null) { + if (Dungeon.level.passable[pos+n] && Actor.findChar( pos+n ) == null) { candidates.add( pos+n ); } } @@ -99,4 +104,12 @@ public class DemonSpawner extends Mob { spawnCooldown -= dmg; super.damage(dmg, src); } + + { + immunities.add( Paralysis.class ); + immunities.add( Amok.class ); + immunities.add( Sleep.class ); + immunities.add( Terror.class ); + immunities.add( Vertigo.class ); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java index 1bb8fe7e4..36886f062 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java @@ -33,6 +33,7 @@ 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.LockedFloor; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; @@ -53,7 +54,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.NewPrisonBossLevel; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; -import com.shatteredpixel.shatteredpixeldungeon.messages.Languages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; @@ -305,6 +305,7 @@ public class NewTengu extends Mob { { immunities.add( Blindness.class ); + immunities.add( Terror.class ); } private static final String LAST_ABILITY = "last_ability"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java index 414df0cd5..5d057bb0e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java @@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.sprites.ScorpioSprite; import com.watabou.utils.Random; @@ -98,7 +99,7 @@ public class Scorpio extends Mob { Class<?extends Potion> loot; do{ loot = (Class<? extends Potion>) Random.oneOf(Generator.Category.POTION.classes); - } while (loot == PotionOfHealing.class); + } while (loot == PotionOfHealing.class || loot == PotionOfStrength.class); return Reflection.newInstance(loot); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java index 67cb1300a..4151280e7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java @@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.sprites.SuccubusSprite; import com.watabou.noosa.audio.Sample; @@ -157,7 +158,7 @@ public class Succubus extends Mob { Class<?extends Scroll> loot; do{ loot = (Class<? extends Scroll>) Random.oneOf(Generator.Category.SCROLL.classes); - } while (loot == ScrollOfIdentify.class); + } while (loot == ScrollOfIdentify.class || loot == ScrollOfUpgrade.class); return Reflection.newInstance(loot); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java index 296049add..f4cce2b8e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java @@ -61,7 +61,7 @@ public class EmoIcon extends Image { } } - x = owner.x + owner.width - width / 2; + x = owner.x + owner.width() - width / 2; y = owner.y - height; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java index 7fcf664af..93d642333 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Charm; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM100; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Shaman; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Warlock; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Yog; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; @@ -70,6 +71,7 @@ public class AntiMagic extends Armor.Glyph { RESISTS.add( WandOfWarding.Ward.class ); RESISTS.add( DM100.LightningBolt.class ); + RESISTS.add( Shaman.EarthenBolt.class ); RESISTS.add( Warlock.DarkBolt.class ); RESISTS.add( Eye.DeathGaze.class ); RESISTS.add( Yog.BurningFist.DarkBolt.class ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java index ac3d9d113..e2f6afb6a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java @@ -43,8 +43,10 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; +import com.watabou.noosa.Game; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; +import com.watabou.utils.Callback; import com.watabou.utils.Random; import com.watabou.utils.Reflection; @@ -180,7 +182,12 @@ public class UnstableSpellbook extends Artifact { curUser = Dungeon.hero; curItem = scroll; scroll.anonymize(); - scroll.doRead(); + Game.runOnRenderThread(new Callback() { + @Override + public void call() { + scroll.doRead(); + } + }); detach(); return true; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfElements.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfElements.java index 2b44693f1..3698cad8c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfElements.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfElements.java @@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM100; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Shaman; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Warlock; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Yog; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave; @@ -99,6 +100,7 @@ public class RingOfElements extends Ring { RESISTS.add( Electricity.class ); RESISTS.add( DM100.LightningBolt.class ); + RESISTS.add( Shaman.EarthenBolt.class ); RESISTS.add( Warlock.DarkBolt.class ); RESISTS.add( Eye.DeathGaze.class ); RESISTS.add( Yog.BurningFist.DarkBolt.class );