diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/BlobImmunity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/BlobImmunity.java index e5b537327..6e46db760 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/BlobImmunity.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/BlobImmunity.java @@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StormCloud; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Web; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewTengu; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.Image; @@ -78,6 +79,9 @@ public class BlobImmunity extends FlavourBuff { immunities.add( StormCloud.class ); immunities.add( ToxicGas.class ); immunities.add( Web.class ); + + immunities.add(NewTengu.FireAbility.FireBlob.class); + immunities.add(NewTengu.BombAbility.BombBlob.class); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java index 101262aa6..988b0abde 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -123,6 +124,15 @@ public class Bee extends Mob { return damage; } + @Override + public void add(Buff buff) { + super.add(buff); + if (buff instanceof Corruption){ + intelligentAlly = false; + setPotInfo(-1, null); + } + } + @Override protected Char chooseEnemy() { //if the pot is no longer present, default to regular AI behaviour diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java index 0b20e46ae..74005f401 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java @@ -128,11 +128,12 @@ public abstract class Elemental extends Mob { if (hit( this, enemy, true )) { rangedProc( enemy ); - rangedCooldown = Random.NormalIntRange( 3, 5 ); } else { enemy.sprite.showStatus( CharSprite.NEUTRAL, enemy.defenseVerb() ); } + + rangedCooldown = Random.NormalIntRange( 3, 5 ); } public void onZapComplete() { @@ -282,7 +283,9 @@ public abstract class Elemental extends Mob { @Override protected void rangedProc( Char enemy ) { Buff.affect( enemy, Blindness.class, 5f ); - GameScene.flash( 0xFFFFFF ); + if (enemy == Dungeon.hero) { + GameScene.flash(0xFFFFFF); + } } } 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 36886f062..698caf1ed 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 @@ -717,16 +717,18 @@ public class NewTengu extends Mob { @Override public boolean act() { - + + toCells.clear(); + if (curCells == null){ curCells = new int[1]; curCells[0] = target.pos; - } - - toCells.clear(); - - for (Integer c : curCells){ - spreadFromCell( c ); + spreadFromCell( curCells[0] ); + + } else { + for (Integer c : curCells) { + if (FireBlob.volumeAt(c, FireBlob.class) > 0) spreadFromCell(c); + } } for (Integer c : curCells){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java index 3b16a92c6..cf2098f8d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java @@ -171,6 +171,9 @@ public class Spinner extends Mob { webCoolDown = 10; } + if (Dungeon.level.heroFOV[enemy.pos]){ + Dungeon.hero.interrupt(); + } next(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java index 8a1650dda..cbb95b50d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java @@ -208,6 +208,18 @@ public class Blacksmith extends NPC { Sample.INSTANCE.play( Assets.SND_EVOKE ); ScrollOfUpgrade.upgrade( Dungeon.hero ); Item.evoke( Dungeon.hero ); + + if (second.isEquipped( Dungeon.hero )) { + ((EquipableItem)second).doUnequip( Dungeon.hero, false ); + } + second.detach( Dungeon.hero.belongings.backpack ); + + if (second instanceof Armor){ + BrokenSeal seal = ((Armor) second).checkSeal(); + if (seal != null){ + Dungeon.level.drop( seal, Dungeon.hero.pos ); + } + } if (first.isEquipped( Dungeon.hero )) { ((EquipableItem)first).doUnequip( Dungeon.hero, true ); @@ -224,18 +236,6 @@ public class Blacksmith extends NPC { Dungeon.hero.spendAndNext( 2f ); Badges.validateItemLevelAquired( first ); - if (second.isEquipped( Dungeon.hero )) { - ((EquipableItem)second).doUnequip( Dungeon.hero, false ); - } - second.detach( Dungeon.hero.belongings.backpack ); - - if (second instanceof Armor){ - BrokenSeal seal = ((Armor) second).checkSeal(); - if (seal != null){ - Dungeon.level.drop( seal, Dungeon.hero.pos ); - } - } - Quest.reforged = true; Notes.remove( Notes.Landmark.TROLL ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/MagicMissile.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/MagicMissile.java index 9f55a65d2..397857641 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/MagicMissile.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/MagicMissile.java @@ -94,8 +94,6 @@ public class MagicMissile extends Emitter { public void reset( int type, PointF from, PointF to, Callback callback ) { this.callback = callback; - revive(); - this.to = to; x = from.x; @@ -174,6 +172,8 @@ public class MagicMissile extends Emitter { pour( LeafParticle.GENERAL, 0.03f ); break; } + + revive(); } public void size( float size ) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java index d8cfb9e64..e2277335b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java @@ -190,6 +190,12 @@ public class Honeypot extends Item { } } + public void destroyPot( int potPos ){ + for (Bee bee : findBees(potPos)){ + updateBee(bee, -1, null); + } + } + private void updateBee( Bee bee, int cell, Char holder ){ if (bee != null && bee.alignment == Char.Alignment.ENEMY) bee.setPotInfo( cell, holder ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java index dc95c5f25..f83a3b191 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java @@ -175,7 +175,7 @@ public class ScrollOfTeleportation extends Scroll { int cell; for (Point p : r.charPlaceablePoints(level)){ cell = level.pointToCell(p); - if (level.passable[cell] && !level.visited[cell] && !level.secret[cell]){ + if (level.passable[cell] && !level.visited[cell] && !level.secret[cell] && Actor.findChar(cell) == null){ candidates.add(cell); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java index 331eabbde..8aaf700ec 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java @@ -125,7 +125,7 @@ public class StoneOfIntuition extends InventoryStone { IconTitle titlebar = new IconTitle(); titlebar.icon( new ItemSprite(ItemSpriteSheet.STONE_INTUITION, null) ); - titlebar.label( Messages.get(StoneOfIntuition.class, "name") ); + titlebar.label( Messages.titleCase(Messages.get(StoneOfIntuition.class, "name")) ); titlebar.setRect( 0, 0, WIDTH, 0 ); add( titlebar ); @@ -226,7 +226,7 @@ public class StoneOfIntuition extends InventoryStone { protected void onClick() { curGuess = all[j]; guess.visible = true; - guess.text( Messages.get(curGuess, "name") ); + guess.text( Messages.titleCase(Messages.get(curGuess, "name")) ); guess.enable(true); super.onClick(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java index 644ad8c3b..7ca3c8ad0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java @@ -68,7 +68,7 @@ public class WndInfoItem extends Window { txtInfo.setPos(titlebar.left(), titlebar.bottom() + GAP); add( txtInfo ); - resize( width, (int)(txtInfo.top() + txtInfo.height()) ); + resize( width, (int)(txtInfo.bottom() + 2) ); } private void fillFields( Item item ) { @@ -92,6 +92,6 @@ public class WndInfoItem extends Window { txtInfo.setPos(titlebar.left(), titlebar.bottom() + GAP); add( txtInfo ); - resize( width, (int)(txtInfo.top() + txtInfo.height()) ); + resize( width, (int)(txtInfo.bottom() + 2) ); } } diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties index 787d75ed3..cbe9f1e83 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties @@ -592,7 +592,7 @@ actors.mobs.scorpio.name=scorpio actors.mobs.scorpio.desc=These huge arachnid-like demonic creatures avoid close combat, preferring to fire crippling serrated spikes from long distances. actors.mobs.senior.name=senior monk -actors.mobs.senior.desc=These monks are fanatics, who have devoted themselves to protecting their king through physical might. So great is their devotion that they have totally surrendered their minds to their king, and now roam the dwarvern city like mindless zombies.\n\nThis monk has mastered the art of hang-to-hand combat, and is able to gain focus while moving much more quickly than regular monks. When they become focused, monks will parry the next physical attack used against them, even if it was otherwise guaranteed to hit. Monks build focus more quickly while on the move, and more slowly when in direct combat. +actors.mobs.senior.desc=These monks are fanatics, who have devoted themselves to protecting their king through physical might. So great is their devotion that they have totally surrendered their minds to their king, and now roam the dwarvern city like mindless zombies.\n\nThis monk has mastered the art of hand-to-hand combat, and is able to gain focus while moving much more quickly than regular monks. When they become focused, monks will parry the next physical attack used against them, even if it was otherwise guaranteed to hit. Monks build focus more quickly while on the move, and more slowly when in direct combat. actors.mobs.shaman.name=gnoll shaman actors.mobs.shaman.bolt_kill=The magic bolt killed you... @@ -624,7 +624,7 @@ actors.mobs.statue.def_verb=blocked actors.mobs.statue.desc=You would think that it's just another one of this dungeon's inanimate statues, but its red glowing eyes give it away.\n\nWhile the statue itself is made of stone, the _%s,_ it's wielding looks real. actors.mobs.succubus.name=succubus -actors.mobs.succubus.desc=Succubi are shapeshifting demons that manipulate the minds of their prey. This one has taken the form of a pale gothic humanoid, perhaps to attract dwarven warlocks?\n\nWhen they attack, succubi may charm their target, making them unable to directly attack until the charm wears off. When succubi attack a charmed enemy, they will steal their life essence. +actors.mobs.succubus.desc=Succubi are shapeshifting demons that manipulate the minds of their prey. This one has taken the form of a pale gothic humanoid, perhaps to attract dwarven warlocks?\n\nSuccubi may temporarily charm their enemy when they attack, making their enemy unable to directly attack them. When succubi attack a charmed enemy, they will steal some of their life essence. actors.mobs.swarm.name=swarm of flies actors.mobs.swarm.desc=The deadly swarm of flies buzzes angrily. Every non-magical attack will split it into two smaller but equally dangerous swarms. diff --git a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopPlatformSupport.java b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopPlatformSupport.java index d2014a827..d8ab88eaa 100644 --- a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopPlatformSupport.java +++ b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopPlatformSupport.java @@ -119,7 +119,8 @@ public class DesktopPlatformSupport extends PlatformSupport { } } fonts = new HashMap<>(); - + + //FIXME systemfont setting is currently ignored as DroidSandFallback.ttf is missing key characters basicFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("pixel_font.ttf")); asianFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("DroidSansFallback.ttf"));