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