From bc1e3ee17ab68bc2525d9f2e90b1a614c4cc07ff Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 10 Nov 2015 04:19:04 -0500 Subject: [PATCH] Merging 1.9.1 source: root changes --- .../shatteredpixeldungeon/Assets.java | 1 + .../shatteredpixeldungeon/Badges.java | 30 +++++++++++-------- .../shatteredpixeldungeon/Bones.java | 4 +-- .../shatteredpixeldungeon/Chrome.java | 2 +- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java b/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java index 3b6e1c4e2..b1a11e296 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java @@ -28,6 +28,7 @@ public class Assets { public static final String BANNERS = "banners.png"; public static final String BADGES = "badges.png"; + public static final String LOCKED = "locked_badge.png"; public static final String AMULET = "amulet.png"; public static final String CHROME = "chrome.png"; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/src/com/shatteredpixel/shatteredpixeldungeon/Badges.java index 2c06ddd09..eb149f0ff 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Badges.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Badges.java @@ -411,19 +411,19 @@ public class Badges { } Badge badge = null; - if (!local.contains( Badge.ITEM_LEVEL_1 ) && item.level >= 3) { + if (!local.contains( Badge.ITEM_LEVEL_1 ) && item.level() >= 3) { badge = Badge.ITEM_LEVEL_1; local.add( badge ); } - if (!local.contains( Badge.ITEM_LEVEL_2 ) && item.level >= 6) { + if (!local.contains( Badge.ITEM_LEVEL_2 ) && item.level() >= 6) { badge = Badge.ITEM_LEVEL_2; local.add( badge ); } - if (!local.contains( Badge.ITEM_LEVEL_3 ) && item.level >= 9) { + if (!local.contains( Badge.ITEM_LEVEL_3 ) && item.level() >= 9) { badge = Badge.ITEM_LEVEL_3; local.add( badge ); } - if (!local.contains( Badge.ITEM_LEVEL_4 ) && item.level >= 12) { + if (!local.contains( Badge.ITEM_LEVEL_4 ) && item.level() >= 12) { badge = Badge.ITEM_LEVEL_4; local.add( badge ); } @@ -900,17 +900,15 @@ public class Badges { public static List filtered( boolean global ) { HashSet filtered = new HashSet( global ? Badges.global : Badges.local ); - - if (!global) { - Iterator iterator = filtered.iterator(); - while (iterator.hasNext()) { - Badge badge = iterator.next(); - if (badge.meta) { - iterator.remove(); - } + + Iterator iterator = filtered.iterator(); + while (iterator.hasNext()) { + Badge badge = iterator.next(); + if ((!global && badge.meta) || badge.image == -1) { + iterator.remove(); } } - + leaveBest( filtered, Badge.MONSTERS_SLAIN_1, Badge.MONSTERS_SLAIN_2, Badge.MONSTERS_SLAIN_3, Badge.MONSTERS_SLAIN_4 ); leaveBest( filtered, Badge.GOLD_COLLECTED_1, Badge.GOLD_COLLECTED_2, Badge.GOLD_COLLECTED_3, Badge.GOLD_COLLECTED_4 ); leaveBest( filtered, Badge.BOSS_SLAIN_1, Badge.BOSS_SLAIN_2, Badge.BOSS_SLAIN_3, Badge.BOSS_SLAIN_4 ); @@ -924,7 +922,13 @@ public class Badges { leaveBest( filtered, Badge.DEATH_FROM_GAS, Badge.YASD ); leaveBest( filtered, Badge.DEATH_FROM_HUNGER, Badge.YASD ); leaveBest( filtered, Badge.DEATH_FROM_POISON, Badge.YASD ); + leaveBest( filtered, Badge.ALL_POTIONS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); + leaveBest( filtered, Badge.ALL_SCROLLS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); + leaveBest( filtered, Badge.ALL_RINGS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); + leaveBest( filtered, Badge.ALL_WANDS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); leaveBest( filtered, Badge.VICTORY, Badge.VICTORY_ALL_CLASSES ); + leaveBest( filtered, Badge.VICTORY, Badge.HAPPY_END ); + leaveBest( filtered, Badge.VICTORY, Badge.CHAMPION ); leaveBest( filtered, Badge.GAMES_PLAYED_1, Badge.GAMES_PLAYED_2, Badge.GAMES_PLAYED_3, Badge.GAMES_PLAYED_4 ); ArrayList list = new ArrayList( filtered ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java b/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java index 945d3d1f2..d3380fa9d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java @@ -175,8 +175,8 @@ public class Bones { if (item.isUpgradable()) { //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 ); + if (lvl < item.level()) { + item.degrade( item.level() - lvl ); } item.levelKnown = false; } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Chrome.java b/src/com/shatteredpixel/shatteredpixeldungeon/Chrome.java index 097b04129..9d09565d5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Chrome.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Chrome.java @@ -47,7 +47,7 @@ public class Chrome { case TOAST_TR: return new NinePatch( Asset, 40, 0, 18, 18, 5 ); case BUTTON: - return new NinePatch( Asset, 58, 0, 4, 4, 1 ); + return new NinePatch( Asset, 58, 0, 6, 6, 2 ); case TAG: return new NinePatch( Asset, 22, 18, 16, 14, 3 ); case GEM: