diff --git a/assets/items.png b/assets/items.png index 9da01671c..5a103f460 100644 Binary files a/assets/items.png and b/assets/items.png differ diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java b/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java index 7b6a65d10..c4b91b35e 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java @@ -18,10 +18,9 @@ package com.shatteredpixel.shatteredpixeldungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; -import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; import com.shatteredpixel.shatteredpixeldungeon.items.Gold; import com.shatteredpixel.shatteredpixeldungeon.items.Item; -import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon; import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlot; import com.watabou.noosa.Game; import com.watabou.utils.Bundle; @@ -44,11 +43,14 @@ public class Bones { private static Item item; public static void leave() { - - item = pickItem(Dungeon.hero); - - depth = Dungeon.depth; + depth = Dungeon.depth; + + //heroes which have already won the game, or who die much higher than their deepest depth drop no bones. + if (Statistics.amuletObtained || (Statistics.deepestFloor - 5) >= depth) + return; + + item = pickItem(Dungeon.hero); Bundle bundle = new Bundle(); bundle.put( LEVEL, depth ); @@ -92,22 +94,26 @@ public class Bones { ArrayList items = new ArrayList(); while (iterator.hasNext()){ curItem = iterator.next(); - if (curItem.bones && !(curItem instanceof EquipableItem)) + if (curItem.bones) items.add(curItem); } - if (!items.isEmpty()) { + if (Random.Int(3) < items.size()) { item = Random.element(items); if (item.stackable){ - item.quantity((int)Math.sqrt(item.quantity())); + if (item instanceof MissileWeapon){ + item.quantity(Random.NormalIntRange(1, item.quantity())); + } else { + item.quantity(Random.NormalIntRange(1, (item.quantity() + 1) / 2)); + } } } } if (item == null) { - if (Dungeon.gold > 0) { - item = new Gold( Random.NormalIntRange( 1, Dungeon.gold ) ); + if (Dungeon.gold > 50) { + item = new Gold( Random.NormalIntRange( 50, Dungeon.gold ) ); } else { - item = new Gold( 1 ); + item = new Gold( 50 ); } } return item; @@ -139,7 +145,8 @@ public class Bones { item.cursed = true; item.cursedKnown = true; if (item.isUpgradable()) { - int lvl = (Dungeon.depth - 1) * 3 / 5 + 1; + //gain 1 level every 3.333 floors down plus one additional level. + int lvl = 1 + ((Dungeon.depth * 3) / 10); if (lvl < item.level) { item.degrade( item.level - lvl ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java index 225b226a1..b3f3a5ee3 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java @@ -33,8 +33,7 @@ public class ConfusionGas extends Blob { Char ch; for (int i=0; i < LENGTH; i++) { if (cur[i] > 0 && (ch = Actor.findChar( i )) != null) { - if (!ch.immunities().contains(this.getClass())) - Buff.prolong( ch, Vertigo.class, 1 ); + Buff.prolong( ch, Vertigo.class, 2 ); } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java index ea3a2a643..e85712b31 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java @@ -29,7 +29,7 @@ public class Drowsy extends Buff { } public boolean attachTo( Char target ) { - if (super.attachTo(target)) { + if (super.attachTo(target) && !target.immunities().contains(Sleep.class)) { if (cooldown() == 0) spend(Random.Int(3, 6)); return true; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java index 9dbbf2ac4..fdf76d624 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java @@ -30,7 +30,7 @@ public class MagicalSleep extends Buff { @Override public boolean attachTo( Char target ) { - if (super.attachTo( target )) { + if (super.attachTo( target ) && !target.immunities().contains(Sleep.class)) { if (target instanceof Hero) if (target.HP == target.HT) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 89bf0e60d..d6524cecf 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -658,6 +658,7 @@ public class Hero extends Char { Camera.main.shake( 1, 0.5f ); break; case SKELETON: + case REMAINS: break; default: Sample.INSTANCE.play( Assets.SND_UNLOCK ); @@ -1318,7 +1319,7 @@ public class Hero extends Char { } Heap heap = Dungeon.level.heaps.get( ((HeroAction.OpenChest)curAction).dst ); - if (heap.type == Type.SKELETON) { + if (heap.type == Type.SKELETON || heap.type == Type.REMAINS) { Sample.INSTANCE.play( Assets.SND_BONES ); } heap.open( this ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Heap.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/Heap.java index 14a5c6bfb..5d2d9cf47 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/Heap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/Heap.java @@ -56,7 +56,8 @@ public class Heap implements Bundlable { LOCKED_CHEST, CRYSTAL_CHEST, TOMB, - SKELETON + SKELETON, + REMAINS } public Type type = Type.HEAP; @@ -81,6 +82,8 @@ public class Heap implements Bundlable { return ItemSpriteSheet.TOMB; case SKELETON: return ItemSpriteSheet.BONES; + case REMAINS: + return ItemSpriteSheet.REMAINS; default: return 0; } @@ -96,6 +99,7 @@ public class Heap implements Bundlable { Wraith.spawnAround( hero.pos ); break; case SKELETON: + case REMAINS: CellEmitter.center( pos ).start( Speck.factory( Speck.RATTLE ), 0.1f, 3 ); for (Item item : items) { if (item.cursed) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java index c7e95fc07..ebdbb8556 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java @@ -25,6 +25,8 @@ public class ClothArmor extends Armor { { name = "cloth armor"; image = ItemSpriteSheet.ARMOR_CLOTH; + + bones = false; //Finding them in bones would be semi-frequent and disappointing. } public ClothArmor() { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java index 2d6f1ead0..6d341b2c5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java @@ -201,7 +201,7 @@ public class CavesBossLevel extends Level { do { pos = Random.IntRange( ROOM_LEFT, ROOM_RIGHT ) + Random.IntRange( ROOM_TOP + 1, ROOM_BOTTOM ) * WIDTH; } while (pos == entrance || map[pos] == Terrain.SIGN); - drop( item, pos ).type = Heap.Type.SKELETON; + drop( item, pos ).type = Heap.Type.REMAINS; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java index 77a435cb1..2a714796a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java @@ -159,7 +159,7 @@ public class CityBossLevel extends Level { Random.IntRange( LEFT + 1, LEFT + HALL_WIDTH - 2 ) + Random.IntRange( TOP + HALL_HEIGHT + 1, TOP + HALL_HEIGHT + CHAMBER_HEIGHT ) * WIDTH; } while (pos == entrance || map[pos] == Terrain.SIGN); - drop( item, pos ).type = Heap.Type.SKELETON; + drop( item, pos ).type = Heap.Type.REMAINS; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java index fd067170e..2a6a21619 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java @@ -150,7 +150,7 @@ public class HallsBossLevel extends Level { do { pos = Random.IntRange( ROOM_LEFT, ROOM_RIGHT ) + Random.IntRange( ROOM_TOP + 1, ROOM_BOTTOM ) * WIDTH; } while (pos == entrance || map[pos] == Terrain.SIGN); - drop( item, pos ).type = Heap.Type.SKELETON; + drop( item, pos ).type = Heap.Type.REMAINS; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastShopLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastShopLevel.java index 72c48139d..3bcf70aac 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastShopLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastShopLevel.java @@ -17,9 +17,6 @@ */ package com.shatteredpixel.shatteredpixeldungeon.levels; -import java.util.List; - -import com.watabou.noosa.Scene; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Bones; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; @@ -27,9 +24,12 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Imp; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.levels.Room.Type; +import com.watabou.noosa.Scene; import com.watabou.utils.Graph; import com.watabou.utils.Random; +import java.util.List; + public class LastShopLevel extends RegularLevel { { @@ -170,7 +170,7 @@ public class LastShopLevel extends RegularLevel { do { pos = roomEntrance.random(); } while (pos == entrance || map[pos] == Terrain.SIGN); - drop( item, pos ).type = Heap.Type.SKELETON; + drop( item, pos ).type = Heap.Type.REMAINS; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java index 2dda8e655..a1b845d1d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java @@ -17,9 +17,6 @@ */ package com.shatteredpixel.shatteredpixeldungeon.levels; -import java.util.List; - -import com.watabou.noosa.Scene; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Bones; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -34,11 +31,14 @@ import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey; import com.shatteredpixel.shatteredpixeldungeon.levels.Room.Type; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.watabou.noosa.Scene; import com.watabou.utils.Bundle; import com.watabou.utils.Graph; import com.watabou.utils.Point; import com.watabou.utils.Random; +import java.util.List; + public class PrisonBossLevel extends RegularLevel { { @@ -297,7 +297,7 @@ public class PrisonBossLevel extends RegularLevel { do { pos = roomEntrance.random(); } while (pos == entrance || map[pos] == Terrain.SIGN); - drop( item, pos ).type = Heap.Type.SKELETON; + drop( item, pos ).type = Heap.Type.REMAINS; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index d6c3cbec1..4fba476d9 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -17,11 +17,6 @@ */ package com.shatteredpixel.shatteredpixeldungeon.levels; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; - import com.shatteredpixel.shatteredpixeldungeon.Bones; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; @@ -34,12 +29,17 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; import com.shatteredpixel.shatteredpixeldungeon.levels.Room.Type; -import com.shatteredpixel.shatteredpixeldungeon.levels.painters.*; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.watabou.utils.Bundle; import com.watabou.utils.Graph; import com.watabou.utils.Random; import com.watabou.utils.Rect; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; + public abstract class RegularLevel extends Level { protected HashSet rooms; @@ -632,7 +632,7 @@ public abstract class RegularLevel extends Level { Item item = Bones.get(); if (item != null) { - drop( item, randomDropCell() ).type = Heap.Type.SKELETON; + drop( item, randomDropCell() ).type = Heap.Type.REMAINS; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java index 2dda8a00a..dfd9bb068 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java @@ -17,10 +17,6 @@ */ package com.shatteredpixel.shatteredpixeldungeon.levels; -import java.util.ArrayList; -import java.util.List; - -import com.watabou.noosa.Scene; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Bones; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -31,10 +27,14 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.levels.Room.Type; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.watabou.noosa.Scene; import com.watabou.utils.Bundle; import com.watabou.utils.Graph; import com.watabou.utils.Random; +import java.util.ArrayList; +import java.util.List; + public class SewerBossLevel extends RegularLevel { { @@ -232,7 +232,7 @@ public class SewerBossLevel extends RegularLevel { do { pos = roomEntrance.random(); } while (pos == entrance || map[pos] == Terrain.SIGN); - drop( item, pos ).type = Heap.Type.SKELETON; + drop( item, pos ).type = Heap.Type.REMAINS; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java index 81009f679..c6b8ddd69 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java @@ -20,9 +20,12 @@ package com.shatteredpixel.shatteredpixeldungeon.plants; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; public class Dreamfoil extends Plant { @@ -42,6 +45,10 @@ public class Dreamfoil extends Plant { if (ch != null) { if (ch instanceof Mob) Buff.affect(ch, MagicalSleep.class); + else if (ch instanceof Hero){ + GLog.w("The poison isn't strong enough to put you to sleep, you are weakened instead."); + Buff.affect(ch, Weakness.class, Weakness.duration(ch)); + } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java index fb2c25b41..abff07c4f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java @@ -1,11 +1,8 @@ package com.shatteredpixel.shatteredpixeldungeon.plants; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; -import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -15,8 +12,8 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class Stormvine extends Plant { private static final String TXT_DESC = - "Stormvine is an unusual sort fo vine which 'hangs' on the air. " + - "Gravity affects it strangely, and anything caught in the vine is confused as a result."; + "Stormvine is an unusual sort of vine which 'hangs' on the air. " + + "It somehow nuffies gravity around it, and anything caught in the vine is disoriented as a result."; { image = 9; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java index 7a18bc08c..0dc35c1d5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java @@ -43,15 +43,16 @@ public class ItemSpriteSheet { public static final int DEWDROP = ROW1+1; // Heaps (containers) public static final int BONES = ROW1+2; - public static final int TOMB = ROW1+3; - public static final int CHEST = ROW1+4; - public static final int LOCKED_CHEST = ROW1+5; - public static final int CRYSTAL_CHEST = ROW1+6; + public static final int REMAINS = ROW1+3; + public static final int TOMB = ROW1+4; + public static final int CHEST = ROW1+5; + public static final int LOCKED_CHEST = ROW1+6; + public static final int CRYSTAL_CHEST = ROW1+7; // Placeholders - public static final int WEAPON = ROW1+7; - public static final int ARMOR = ROW1+8; - public static final int RING = ROW1+9; - public static final int SMTH = ROW1+10; + public static final int WEAPON = ROW1+8; + public static final int ARMOR = ROW1+9; + public static final int RING = ROW1+10; + public static final int SMTH = ROW1+11; //Row Two: Miscellaneous single use items public static final int GOLD = ROW2+0; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java index 87aa3de54..cb2ff7ef6 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java @@ -17,20 +17,19 @@ */ package com.shatteredpixel.shatteredpixeldungeon.ui; -import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey; -import com.shatteredpixel.shatteredpixeldungeon.items.keys.Key; -import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey; -import com.watabou.noosa.BitmapText; -import com.watabou.noosa.ui.Button; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; +import com.shatteredpixel.shatteredpixeldungeon.items.keys.Key; +import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.Utils; +import com.watabou.noosa.BitmapText; +import com.watabou.noosa.ui.Button; public class ItemSlot extends Button { @@ -68,6 +67,9 @@ public class ItemSlot extends Button { public static final Item SKELETON = new Item() { public int image() { return ItemSpriteSheet.BONES; }; }; + public static final Item REMAINS = new Item() { + public int image() { return ItemSpriteSheet.REMAINS; }; + }; public ItemSlot() { super(); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java index 690d469a2..7848d982c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java @@ -69,6 +69,7 @@ public class LootIndicator extends Tag { heap.type == Heap.Type.CRYSTAL_CHEST ? ItemSlot.CRYSTAL_CHEST : heap.type == Heap.Type.TOMB ? ItemSlot.TOMB : heap.type == Heap.Type.SKELETON ? ItemSlot.SKELETON : + heap.type == Heap.Type.REMAINS ? ItemSlot.REMAINS : heap.peek(); if (item != lastItem || item.quantity() != lastQuantity) { lastItem = item; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java index 49d33391c..8b75e1ef8 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java @@ -62,12 +62,11 @@ public class WndInfoCell extends Window { add( info ); StringBuilder desc = new StringBuilder( Dungeon.level.tileDesc( tile ) ); - - final char newLine = '\n'; + for (Blob blob:Dungeon.level.blobs.values()) { if (blob.cur[cell] > 0 && blob.tileDesc() != null) { if (desc.length() > 0) { - desc.append( newLine ); + desc.append( "\n\n" ); } desc.append( blob.tileDesc() ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java index 3c4694954..3016ad9d0 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java @@ -30,18 +30,22 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.Utils; public class WndInfoItem extends Window { - private static final String TXT_CHEST = "Chest"; - private static final String TXT_LOCKED_CHEST = "Locked chest"; - private static final String TXT_CRYSTAL_CHEST = "Crystal chest"; - private static final String TXT_TOMB = "Tomb"; - private static final String TXT_SKELETON = "Skeletal remains"; + private static final String TTL_CHEST = "Chest"; + private static final String TTL_LOCKED_CHEST = "Locked chest"; + private static final String TTL_CRYSTAL_CHEST = "Crystal chest"; + private static final String TTL_TOMB = "Tomb"; + private static final String TTL_SKELETON = "Skeletal remains"; + private static final String TTL_REMAINS = "Heroes remains"; private static final String TXT_WONT_KNOW = "You won't know what's inside until you open it!"; private static final String TXT_NEED_KEY = TXT_WONT_KNOW + " But to open it you need a golden key."; private static final String TXT_INSIDE = "You can see %s inside, but to open the chest you need a golden key."; private static final String TXT_OWNER = "This ancient tomb may contain something useful, " + "but its owner will most certainly object to checking."; - private static final String TXT_REMAINS = + private static final String TXT_SKELETON = + "This is all that's left of some unfortunate adventurer. " + + "Maybe it's worth checking for any valuables."; + private static final String TXT_REMAINS = "This is all that's left from one of your predecessors. " + "Maybe it's worth checking for any valuables."; @@ -71,22 +75,25 @@ public class WndInfoItem extends Window { String info; if (heap.type == Type.CHEST) { - title = TXT_CHEST; + title = TTL_CHEST; info = TXT_WONT_KNOW; } else if (heap.type == Type.TOMB) { - title = TXT_TOMB; + title = TTL_TOMB; info = TXT_OWNER; } else if (heap.type == Type.SKELETON) { - title = TXT_SKELETON; - info = TXT_REMAINS; + title = TTL_SKELETON; + info = TXT_SKELETON; + } else if (heap.type == Type.REMAINS) { + title = TTL_REMAINS; + info = TXT_REMAINS; } else if (heap.type == Type.CRYSTAL_CHEST) { - title = TXT_CRYSTAL_CHEST; + title = TTL_CRYSTAL_CHEST; if (heap.peek() instanceof Artifact) info = Utils.format( TXT_INSIDE, "an artifact" ); else info = Utils.format( TXT_INSIDE, Utils.indefinite( heap.peek().name() ) ); } else { - title = TXT_LOCKED_CHEST; + title = TTL_LOCKED_CHEST; info = TXT_NEED_KEY; }