diff --git a/core/src/main/assets/interfaces/badges.png b/core/src/main/assets/interfaces/badges.png index 61af3e18d..977a8d1b4 100644 Binary files a/core/src/main/assets/interfaces/badges.png and b/core/src/main/assets/interfaces/badges.png differ diff --git a/core/src/main/assets/interfaces/surface.png b/core/src/main/assets/interfaces/surface.png index 98d73c695..652a2e83a 100644 Binary files a/core/src/main/assets/interfaces/surface.png and b/core/src/main/assets/interfaces/surface.png differ diff --git a/core/src/main/assets/messages/misc/misc.properties b/core/src/main/assets/messages/misc/misc.properties index ab718a91a..18f23a337 100644 --- a/core/src/main/assets/messages/misc/misc.properties +++ b/core/src/main/assets/messages/misc/misc.properties @@ -80,6 +80,8 @@ badges$badge.boss_slain_1_all_classes.title=Jack of Many Trades badges$badge.boss_slain_1_all_classes.desc=Defeat the first boss with every hero class badges$badge.boss_slain_3_all_subclasses.title=Jack of All Trades badges$badge.boss_slain_3_all_subclasses.desc=Defeat the third boss with every hero subclass +badges$badge.boss_slain_remains.title=Taste Vengeance! +badges$badge.boss_slain_remains.desc=Defeat a boss while holding the signature item of a hero who died to that boss badges$badge.strength_attained_1.title=Novice Bodybuilder badges$badge.strength_attained_1.desc=Reach 12 base points of strength badges$badge.strength_attained_2.title=Adept Bodybuilder @@ -164,6 +166,8 @@ badges$badge.high_score_5.title=Grandmaster Score Chaser badges$badge.high_score_5.desc=End a run with a score of 1,000,000 or higher badges$badge.happy_end.title=Happy Ending badges$badge.happy_end.desc=Take the Amulet of Yendor to the surface +badges$badge.happy_end_remains.title=You Made It Too +badges$badge.happy_end_remains.desc=Bring a fallen hero's signature item to the surface badges$badge.champion_1.title=Bronze Champion badges$badge.champion_1.desc=Beat the game with 1 or more challenges enabled badges$badge.champion_2.title=Silver Champion diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java index 60ea34ad6..f515789ef 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster; import com.shatteredpixel.shatteredpixeldungeon.items.bags.PotionBandolier; import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder; import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch; +import com.shatteredpixel.shatteredpixeldungeon.items.remains.RemainsItem; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; import com.shatteredpixel.shatteredpixeldungeon.journal.Catalog; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -83,35 +84,36 @@ public class Badges { //silver NO_MONSTERS_SLAIN ( 32 ), - MONSTERS_SLAIN_3 ( 33 ), - MONSTERS_SLAIN_4 ( 34 ), - GOLD_COLLECTED_3 ( 35 ), - GOLD_COLLECTED_4 ( 36 ), - ITEM_LEVEL_2 ( 37 ), - ITEM_LEVEL_3 ( 38 ), - LEVEL_REACHED_2 ( 39 ), - LEVEL_REACHED_3 ( 40 ), - STRENGTH_ATTAINED_2 ( 41 ), - STRENGTH_ATTAINED_3 ( 42 ), - FOOD_EATEN_2 ( 43 ), - FOOD_EATEN_3 ( 44 ), - ITEMS_CRAFTED_2 ( 45 ), - ITEMS_CRAFTED_3 ( 46 ), - BOSS_SLAIN_2 ( 47 ), - BOSS_SLAIN_3 ( 48 ), - ALL_POTIONS_IDENTIFIED ( 49 ), - ALL_SCROLLS_IDENTIFIED ( 50 ), - DEATH_FROM_ENEMY_MAGIC ( 51 ), - DEATH_FROM_FRIENDLY_MAGIC ( 52 ), - DEATH_FROM_SACRIFICE ( 53 ), + BOSS_SLAIN_REMAINS ( 33 ), + MONSTERS_SLAIN_3 ( 34 ), + MONSTERS_SLAIN_4 ( 35 ), + GOLD_COLLECTED_3 ( 36 ), + GOLD_COLLECTED_4 ( 37 ), + ITEM_LEVEL_2 ( 38 ), + ITEM_LEVEL_3 ( 39 ), + LEVEL_REACHED_2 ( 40 ), + LEVEL_REACHED_3 ( 41 ), + STRENGTH_ATTAINED_2 ( 42 ), + STRENGTH_ATTAINED_3 ( 43 ), + FOOD_EATEN_2 ( 44 ), + FOOD_EATEN_3 ( 45 ), + ITEMS_CRAFTED_2 ( 46 ), + ITEMS_CRAFTED_3 ( 47 ), + BOSS_SLAIN_2 ( 48 ), + BOSS_SLAIN_3 ( 49 ), + ALL_POTIONS_IDENTIFIED ( 50 ), + ALL_SCROLLS_IDENTIFIED ( 51 ), + DEATH_FROM_ENEMY_MAGIC ( 52 ), + DEATH_FROM_FRIENDLY_MAGIC ( 53 ), + DEATH_FROM_SACRIFICE ( 54 ), BOSS_SLAIN_1_WARRIOR, BOSS_SLAIN_1_MAGE, BOSS_SLAIN_1_ROGUE, BOSS_SLAIN_1_HUNTRESS, BOSS_SLAIN_1_DUELIST, - BOSS_SLAIN_1_ALL_CLASSES ( 54, true ), - GAMES_PLAYED_2 ( 55, true ), - HIGH_SCORE_2 ( 56 ), + BOSS_SLAIN_1_ALL_CLASSES ( 55, true ), + GAMES_PLAYED_2 ( 56, true ), + HIGH_SCORE_2 ( 57 ), //gold PIRANHAS ( 64 ), @@ -146,17 +148,18 @@ public class Badges { ITEM_LEVEL_5 ( 96 ), LEVEL_REACHED_5 ( 97 ), HAPPY_END ( 98 ), - ALL_WEAPONS_IDENTIFIED ( 99 ), - ALL_ARMOR_IDENTIFIED ( 100 ), - ALL_WANDS_IDENTIFIED ( 101 ), - ALL_ITEMS_IDENTIFIED ( 102, true ), + HAPPY_END_REMAINS ( 99 ), + ALL_WEAPONS_IDENTIFIED ( 100 ), + ALL_ARMOR_IDENTIFIED ( 101 ), + ALL_WANDS_IDENTIFIED ( 102 ), + ALL_ITEMS_IDENTIFIED ( 103, true ), VICTORY_WARRIOR, VICTORY_MAGE, VICTORY_ROGUE, VICTORY_HUNTRESS, VICTORY_DUELIST, - VICTORY_ALL_CLASSES ( 103, true ), - DEATH_FROM_ALL ( 104, true ), + VICTORY_ALL_CLASSES ( 104, true ), + DEATH_FROM_ALL ( 105, true ), BOSS_SLAIN_3_GLADIATOR, BOSS_SLAIN_3_BERSERKER, BOSS_SLAIN_3_WARLOCK, @@ -167,12 +170,12 @@ public class Badges { BOSS_SLAIN_3_WARDEN, BOSS_SLAIN_3_CHAMPION, BOSS_SLAIN_3_MONK, - BOSS_SLAIN_3_ALL_SUBCLASSES ( 105, true ), - BOSS_CHALLENGE_3 ( 106 ), - BOSS_CHALLENGE_4 ( 107 ), - GAMES_PLAYED_4 ( 108, true ), - HIGH_SCORE_4 ( 109 ), - CHAMPION_1 ( 110 ), + BOSS_SLAIN_3_ALL_SUBCLASSES ( 106, true ), + BOSS_CHALLENGE_3 ( 107 ), + BOSS_CHALLENGE_4 ( 108 ), + GAMES_PLAYED_4 ( 109, true ), + HIGH_SCORE_4 ( 110 ), + CHAMPION_1 ( 111 ), //diamond BOSS_CHALLENGE_5 ( 120 ), @@ -794,6 +797,14 @@ public class Badges { } } } + + if (Statistics.qualifiedForBossRemainsBadge && Dungeon.hero.belongings.getItem(RemainsItem.class) != null){ + badge = Badge.BOSS_SLAIN_REMAINS; + if (!isUnlocked( badge )) { + displayBadge( badge ); + } + } + } } @@ -994,10 +1005,17 @@ public class Badges { if (!local.contains( Badge.HAPPY_END )){ local.add( Badge.HAPPY_END ); } + + if(!local.contains( Badge.HAPPY_END_REMAINS ) && Dungeon.hero.belongings.getItem(RemainsItem.class) != null){ + local.add( Badge.HAPPY_END_REMAINS ); + } } public static void validateHappyEnd() { displayBadge( Badge.HAPPY_END ); + if (local.contains(Badge.HAPPY_END_REMAINS)) { + displayBadge(Badge.HAPPY_END_REMAINS); + } } public static void validateChampion( int challenges ) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java index db563edc1..a8a681d83 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java @@ -239,6 +239,9 @@ public class Bones { if (heroClass != null) { result.add(RemainsItem.get(heroClass)); + if (Dungeon.bossLevel()){ + Statistics.qualifiedForBossRemainsBadge = true; + } } if (item != null) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index c22af2446..7500043af 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -382,6 +382,8 @@ public class Dungeon { } } } + + Statistics.qualifiedForBossRemainsBadge = false; level.create(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java index ae19b681c..9956ac438 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java @@ -61,6 +61,7 @@ public class Statistics { public static boolean qualifiedForNoKilling = false; public static boolean completedWithNoKilling = false; + public static boolean qualifiedForBossRemainsBadge = false; public static boolean qualifiedForBossChallengeBadge = false; public static boolean amuletObtained = false; @@ -100,6 +101,7 @@ public class Statistics { duration = 0; qualifiedForNoKilling = false; + qualifiedForBossRemainsBadge = false; qualifiedForBossChallengeBadge = false; amuletObtained = false; @@ -139,6 +141,7 @@ public class Statistics { private static final String DURATION = "duration"; private static final String NO_KILLING_QUALIFIED = "qualifiedForNoKilling"; + private static final String BOSS_REMAINS_QUALIFIED = "qualifiedForBossRemainsBadge"; private static final String BOSS_CHALLENGE_QUALIFIED= "qualifiedForBossChallengeBadge"; private static final String AMULET = "amuletObtained"; @@ -181,6 +184,7 @@ public class Statistics { bundle.put( DURATION, duration ); bundle.put(NO_KILLING_QUALIFIED, qualifiedForNoKilling); + bundle.put(BOSS_REMAINS_QUALIFIED, qualifiedForBossRemainsBadge); bundle.put(BOSS_CHALLENGE_QUALIFIED, qualifiedForBossChallengeBadge); bundle.put( AMULET, amuletObtained ); @@ -227,7 +231,7 @@ public class Statistics { duration = bundle.getFloat( DURATION ); qualifiedForNoKilling = bundle.getBoolean( NO_KILLING_QUALIFIED ); - + qualifiedForBossRemainsBadge = bundle.getBoolean( BOSS_REMAINS_QUALIFIED ); qualifiedForBossChallengeBadge = bundle.getBoolean( BOSS_CHALLENGE_QUALIFIED ); amuletObtained = bundle.getBoolean( AMULET ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java index 02f32a7a0..4a6fa388a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java @@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; +import com.shatteredpixel.shatteredpixeldungeon.items.remains.RemainsItem; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfWarding; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; @@ -217,6 +218,14 @@ public class SurfaceScene extends PixelScene { align(allySprite); window.add(allySprite); } + + if (Dungeon.hero.belongings.getItem(RemainsItem.class) != null){ + Image grave = new Image(Assets.Interfaces.SURFACE, 88, 74, 16, 22); + + grave.x = a.x + a.width() + 10; + grave.y = a.y + a.height() - grave.height(); + window.add(grave); + } window.add( a ); window.add( pet );