v0.8.0: fixed the following bugs:

- ring of elements and antimagic glyph not applying to new shamans
- game crash/freeze issues caused by inventory scrolls and new spellbook behaviour
- incorrect EmoIcon positions when sprites are scaled
- succubi and scorpios dropping scrolls of upgrade and potions of strength
- rare crashes caused by demon spawners spawning ripper demons onto pits
- demon spawners beig vulnerable to ai state debuffs when they shouldn't be
- Tengu being vulnerable to terror when he shouldn't be
This commit is contained in:
Evan Debenham 2019-12-01 13:17:34 -05:00
parent 8afa87fb10
commit 4941e2afaa
8 changed files with 33 additions and 6 deletions

View File

@ -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 );
}
}

View File

@ -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";

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;
}
}

View File

@ -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 );

View File

@ -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;
}

View File

@ -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 );