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:
parent
8afa87fb10
commit
4941e2afaa
|
@ -23,6 +23,11 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
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.effects.Pushing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
|
@ -65,7 +70,7 @@ public class DemonSpawner extends Mob {
|
||||||
if (spawnCooldown <= 0){
|
if (spawnCooldown <= 0){
|
||||||
ArrayList<Integer> candidates = new ArrayList<>();
|
ArrayList<Integer> candidates = new ArrayList<>();
|
||||||
for (int n : PathFinder.NEIGHBOURS8) {
|
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 );
|
candidates.add( pos+n );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,4 +104,12 @@ public class DemonSpawner extends Mob {
|
||||||
spawnCooldown -= dmg;
|
spawnCooldown -= dmg;
|
||||||
super.damage(dmg, src);
|
super.damage(dmg, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
immunities.add( Paralysis.class );
|
||||||
|
immunities.add( Amok.class );
|
||||||
|
immunities.add( Sleep.class );
|
||||||
|
immunities.add( Terror.class );
|
||||||
|
immunities.add( Vertigo.class );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
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.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
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.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.NewPrisonBossLevel;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.NewPrisonBossLevel;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
|
@ -305,6 +305,7 @@ public class NewTengu extends Mob {
|
||||||
|
|
||||||
{
|
{
|
||||||
immunities.add( Blindness.class );
|
immunities.add( Blindness.class );
|
||||||
|
immunities.add( Terror.class );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String LAST_ABILITY = "last_ability";
|
private static final String LAST_ABILITY = "last_ability";
|
||||||
|
|
|
@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ScorpioSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ScorpioSprite;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
@ -98,7 +99,7 @@ public class Scorpio extends Mob {
|
||||||
Class<?extends Potion> loot;
|
Class<?extends Potion> loot;
|
||||||
do{
|
do{
|
||||||
loot = (Class<? extends Potion>) Random.oneOf(Generator.Category.POTION.classes);
|
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);
|
return Reflection.newInstance(loot);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SuccubusSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.SuccubusSprite;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
@ -157,7 +158,7 @@ public class Succubus extends Mob {
|
||||||
Class<?extends Scroll> loot;
|
Class<?extends Scroll> loot;
|
||||||
do{
|
do{
|
||||||
loot = (Class<? extends Scroll>) Random.oneOf(Generator.Category.SCROLL.classes);
|
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);
|
return Reflection.newInstance(loot);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
y = owner.y - height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Charm;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM100;
|
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.Warlock;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Yog;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Yog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
|
@ -70,6 +71,7 @@ public class AntiMagic extends Armor.Glyph {
|
||||||
RESISTS.add( WandOfWarding.Ward.class );
|
RESISTS.add( WandOfWarding.Ward.class );
|
||||||
|
|
||||||
RESISTS.add( DM100.LightningBolt.class );
|
RESISTS.add( DM100.LightningBolt.class );
|
||||||
|
RESISTS.add( Shaman.EarthenBolt.class );
|
||||||
RESISTS.add( Warlock.DarkBolt.class );
|
RESISTS.add( Warlock.DarkBolt.class );
|
||||||
RESISTS.add( Eye.DeathGaze.class );
|
RESISTS.add( Eye.DeathGaze.class );
|
||||||
RESISTS.add( Yog.BurningFist.DarkBolt.class );
|
RESISTS.add( Yog.BurningFist.DarkBolt.class );
|
||||||
|
|
|
@ -43,8 +43,10 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||||
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
import com.watabou.utils.Callback;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
import com.watabou.utils.Reflection;
|
import com.watabou.utils.Reflection;
|
||||||
|
|
||||||
|
@ -180,7 +182,12 @@ public class UnstableSpellbook extends Artifact {
|
||||||
curUser = Dungeon.hero;
|
curUser = Dungeon.hero;
|
||||||
curItem = scroll;
|
curItem = scroll;
|
||||||
scroll.anonymize();
|
scroll.anonymize();
|
||||||
|
Game.runOnRenderThread(new Callback() {
|
||||||
|
@Override
|
||||||
|
public void call() {
|
||||||
scroll.doRead();
|
scroll.doRead();
|
||||||
|
}
|
||||||
|
});
|
||||||
detach();
|
detach();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM100;
|
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.Warlock;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Yog;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Yog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
|
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
|
||||||
|
@ -99,6 +100,7 @@ public class RingOfElements extends Ring {
|
||||||
RESISTS.add( Electricity.class );
|
RESISTS.add( Electricity.class );
|
||||||
|
|
||||||
RESISTS.add( DM100.LightningBolt.class );
|
RESISTS.add( DM100.LightningBolt.class );
|
||||||
|
RESISTS.add( Shaman.EarthenBolt.class );
|
||||||
RESISTS.add( Warlock.DarkBolt.class );
|
RESISTS.add( Warlock.DarkBolt.class );
|
||||||
RESISTS.add( Eye.DeathGaze.class );
|
RESISTS.add( Eye.DeathGaze.class );
|
||||||
RESISTS.add( Yog.BurningFist.DarkBolt.class );
|
RESISTS.add( Yog.BurningFist.DarkBolt.class );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user