From 3c5a8c9ca4c5dbb0b6b8e5e12e61db492d47cfea Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 8 Jul 2017 18:54:37 -0400 Subject: [PATCH] v0.6.1: removed some outdated badges & tied catalogs into badge system --- core/src/main/assets/badges.png | Bin 3084 -> 2885 bytes .../shatteredpixeldungeon/Badges.java | 159 ++++++------------ .../shatteredpixeldungeon/Statistics.java | 5 - .../actors/mobs/Mob.java | 8 - .../items/potions/Potion.java | 2 - .../items/rings/Ring.java | 5 +- .../items/scrolls/Scroll.java | 2 - .../journal/Catalogs.java | 85 ++++++++-- .../windows/WndJournal.java | 2 +- .../messages/misc/misc.properties | 13 +- .../messages/windows/windows.properties | 6 - 11 files changed, 130 insertions(+), 157 deletions(-) diff --git a/core/src/main/assets/badges.png b/core/src/main/assets/badges.png index d7c479d2b3b96d8d4b734a98c57d6ccf0e9f6249..849f9f64c8cb94daf8a1e89e28f2ad7d610eba7d 100644 GIT binary patch delta 2720 zcmV;R3Sae%7{wNlBmrNMB~pL+|MIG{taE^XW@cu;6EHM1Gyr#o6jIFp@&MIv*8j}^ z^6HHDlpW>XxXi+j!lVD0X8)b=;#}s>?HnYyKe%PlcbSxWO-)Sz008FZ=D)wc!otFL zS+iNQq|m1=KtMo5o>NS>UY-jJGcz*)Mr;xivwtpsrkTJ0qq6^If7A=`ow(*)vsq}B zvssfU0aSm_kyGX6Ma*Vqvo<#W*|N-tX63`7rfyTrsE@3_zqn#Izo|K7W?bdv&ww*C zA|@t)P(bzHh7AA!00neXPE-H?|Nj8{whmJO011#uL_t(|0qoX=ZZ$g$1mN);A7;+J z|BGH**6nT@X(RtkQ%JwU#4h7g!mt(S-8?sz<% zPKV_IoV8FJgL`Z8LO;Qr#ccQNyzgkuNLq+?N@Pm%#g0Yl}BBW$^*5 z*ZY5Vv0=&*1MK(f&3d!h*b89Z2g}joXWl-5XXSNXnD=3ltj7V?V`0``JAf?qA6bBT zFUP)R-cZ3L)E{lA3dgAaX#e|v0N{B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F@?n3^e`hB+L(SHw2Y)iYIr}K6kXDuLR*hlBwvMlTBBmCJu z?wgcC*xV&<7m6!v5M5 zxBLBC0uyWrNCBY<_=o{MVdjgRB#<0nAk8O%cE4XuU`lKWXze`Ab->w2}F}OzNYIODY!caeqCEJ&em;(O~#PukCAJ^L| zk@)laojLzMkgosr^MU{84~Sh35=&UE`pnHiVhMA7nQ7QUOdw$fEc16spsl;E?wCN4 zHDemC$BIm#%$hR|JKhkm#K0$=6QyYym3R;zMuhJQFOXa=!_ zM@gC6r!3Z^qno-OCHYvvLlfr(LnBUBiyeSiv5SQj#d!fcaNzL+%eQu5Yw6g;dBF%r z7b_F!cSBU@=W!f4FTfK&Zwd6>rk;jg9)@9DU(*rtGZWY)=4bfrI>Dlse%D3J&&}Jh zIl=$WANc=&Kx{flEMc|kGk?zqi6zYSW&T|fxZYv{Mb?~Qc>gLUP-4wljDEKp1C|(A zSnC=LA_LU?Y% zlM_tCC^0{WgHEvM^x8Fv`FRez<`ew?|G<}0tw6;=7>0J`KEe4_{g^Y>ZEoh)^UE(y zG&-V`a<5c)JlK250Kvr0_YEuP|D7k8`Mxu(pcm#11@8R!4$j;CfNqB)9lQcaS1vs+ zaT~zw2e31Jf0h7NhkqU1C#M#bxD8+i6zt!34AtYHI>7DDcmUM%!vIawERW39|2)9R zcmfo-^IwKjfY)}|AT-x&L${T$Ny2?hu_zFm-ztOx8bYdm0>pYQ`-E!mkM{%A-st?FDxjL{KB3qXIoS`GrZfHG yG7$B3TgA;jp(WW5DCqU`gTlPPyszu@dj1CrpxH9YOAj^x0000= 15) { - Badge badge = Badge.NIGHT_HUNTER; - local.add( badge ); - displayBadge( badge ); - } - } - - public static void validateSupporter() { - - global.add( Badge.SUPPORTER ); - saveNeeded = true; - - PixelScene.showBadge( Badge.SUPPORTER ); - } - public static void validateGamesPlayed() { Badge badge = null; if (Rankings.INSTANCE.totalNumber >= 10) { @@ -949,10 +893,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_WEAPONS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); + leaveBest( filtered, Badge.ALL_ARMOR_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); + leaveBest( filtered, Badge.ALL_WANDS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); + leaveBest( filtered, Badge.ALL_RINGS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); + leaveBest( filtered, Badge.ALL_ARTIFACTS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED ); 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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java index 6c76f73ac..de714016e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java @@ -31,7 +31,6 @@ public class Statistics { public static int foodEaten; public static int potionsCooked; public static int piranhasKilled; - public static int nightHunt; public static int ankhsUsed; public static float duration; @@ -49,7 +48,6 @@ public class Statistics { foodEaten = 0; potionsCooked = 0; piranhasKilled = 0; - nightHunt = 0; ankhsUsed = 0; duration = 0; @@ -66,7 +64,6 @@ public class Statistics { private static final String FOOD = "foodEaten"; private static final String ALCHEMY = "potionsCooked"; private static final String PIRANHAS = "priranhas"; - private static final String NIGHT = "nightHunt"; private static final String ANKHS = "ankhsUsed"; private static final String DURATION = "duration"; private static final String AMULET = "amuletObtained"; @@ -78,7 +75,6 @@ public class Statistics { bundle.put( FOOD, foodEaten ); bundle.put( ALCHEMY, potionsCooked ); bundle.put( PIRANHAS, piranhasKilled ); - bundle.put( NIGHT, nightHunt ); bundle.put( ANKHS, ankhsUsed ); bundle.put( DURATION, duration ); bundle.put( AMULET, amuletObtained ); @@ -91,7 +87,6 @@ public class Statistics { foodEaten = bundle.getInt( FOOD ); potionsCooked = bundle.getInt( ALCHEMY ); piranhasKilled = bundle.getInt( PIRANHAS ); - nightHunt = bundle.getInt( NIGHT ); ankhsUsed = bundle.getInt( ANKHS ); duration = bundle.getFloat( DURATION ); amuletObtained = bundle.getBoolean( AMULET ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index d832c11e6..f94a6cddd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -47,7 +47,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourg import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; -import com.shatteredpixel.shatteredpixeldungeon.levels.Level.Feeling; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -532,13 +531,6 @@ public abstract class Mob extends Char { Statistics.enemiesSlain++; Badges.validateMonstersSlain(); Statistics.qualifiedForNoKilling = false; - - if (Dungeon.level.feeling == Feeling.DARK) { - Statistics.nightHunt++; - } else { - Statistics.nightHunt = 0; - } - Badges.validateNightHunter(); } int exp = exp(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java index a7bb521bc..326e6264e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java @@ -22,7 +22,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items.potions; import com.shatteredpixel.shatteredpixeldungeon.Assets; -import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; @@ -255,7 +254,6 @@ public class Potion extends Item { } Catalogs.setSeen(getClass()); - Badges.validateAllPotionsIdentified(); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java index f2f162e51..a5b4460ff 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java @@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.ItemStatusHandler; import com.shatteredpixel.shatteredpixeldungeon.items.KindofMisc; +import com.shatteredpixel.shatteredpixeldungeon.journal.Catalogs; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -142,9 +143,7 @@ public class Ring extends KindofMisc { handler.know( this ); } - //Player has to fully identify a ring first - //Catalogs.setSeen(getClass()); - Badges.validateAllRingsIdentified(); + Catalogs.setSeen(getClass()); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java index 7b1f6fa8c..49fe0c02b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java @@ -21,7 +21,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; -import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -171,7 +170,6 @@ public abstract class Scroll extends Item { } Catalogs.setSeen(getClass()); - Badges.validateAllScrollsIdentified(); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalogs.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalogs.java index dbbb7309d..98f68c356 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalogs.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalogs.java @@ -21,6 +21,7 @@ package com.shatteredpixel.shatteredpixeldungeon.journal; +import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.HuntressArmor; @@ -31,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.PlateArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.RogueArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ScaleArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.WarriorArmor; +import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.AlchemistsToolkit; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CapeOfThorns; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.ChaliceOfBlood; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows; @@ -155,21 +157,35 @@ public class Catalogs { return weapons.keySet(); } - private static final LinkedHashMap, Boolean> armors = new LinkedHashMap<>(); - static { - armors.put( ClothArmor.class, false); - armors.put( LeatherArmor.class, false); - armors.put( MailArmor.class, false); - armors.put( ScaleArmor.class, false); - armors.put( PlateArmor.class, false); - armors.put( WarriorArmor.class, false); - armors.put( MageArmor.class, false); - armors.put( RogueArmor.class, false); - armors.put( HuntressArmor.class, false); + public static boolean allWeaponsSeen(){ + for (Boolean val : weapons.values()){ + if (!val) return false; + } + return true; } - public static Collection> armors(){ - return armors.keySet(); + private static final LinkedHashMap, Boolean> armor = new LinkedHashMap<>(); + static { + armor.put( ClothArmor.class, false); + armor.put( LeatherArmor.class, false); + armor.put( MailArmor.class, false); + armor.put( ScaleArmor.class, false); + armor.put( PlateArmor.class, false); + armor.put( WarriorArmor.class, false); + armor.put( MageArmor.class, false); + armor.put( RogueArmor.class, false); + armor.put( HuntressArmor.class, false); + } + + public static Collection> armor(){ + return armor.keySet(); + } + + public static boolean allArmorSeen(){ + for (Boolean val : armor.values()){ + if (!val) return false; + } + return true; } private static final LinkedHashMap, Boolean> wands = new LinkedHashMap<>(); @@ -193,6 +209,13 @@ public class Catalogs { return wands.keySet(); } + public static boolean allWandsSeen(){ + for (Boolean val : wands.values()){ + if (!val) return false; + } + return true; + } + private static final LinkedHashMap, Boolean> rings = new LinkedHashMap<>(); static { rings.put( RingOfAccuracy.class, false); @@ -212,9 +235,16 @@ public class Catalogs { return rings.keySet(); } + public static boolean allRingsSeen(){ + for (Boolean val : rings.values()){ + if (!val) return false; + } + return true; + } + private static final LinkedHashMap, Boolean> artifacts = new LinkedHashMap<>(); static{ - //artifacts.put( AlchemistsToolkit.class, false); + artifacts.put( AlchemistsToolkit.class, false); artifacts.put( CapeOfThorns.class, false); artifacts.put( ChaliceOfBlood.class, false); artifacts.put( CloakOfShadows.class, false); @@ -233,6 +263,13 @@ public class Catalogs { return artifacts.keySet(); } + public static boolean allArtifactsSeen(){ + for (Boolean val : artifacts.values()){ + if (!val) return false; + } + return true; + } + private static final LinkedHashMap, Boolean> potions = new LinkedHashMap<>(); static { potions.put( PotionOfHealing.class, false); @@ -252,6 +289,13 @@ public class Catalogs { public static Collection> potions(){ return potions.keySet(); } + + public static boolean allPotionsSeen(){ + for (Boolean val : potions.values()){ + if (!val) return false; + } + return true; + } private static final LinkedHashMap, Boolean> scrolls = new LinkedHashMap<>(); static { @@ -273,10 +317,17 @@ public class Catalogs { return scrolls.keySet(); } - public static final ArrayList, Boolean>> allCatalogs = new ArrayList<>(); + public static boolean allScrollsSeen(){ + for (Boolean val : scrolls.values()){ + if (!val) return false; + } + return true; + } + + private static final ArrayList, Boolean>> allCatalogs = new ArrayList<>(); static{ allCatalogs.add(weapons); - allCatalogs.add(armors); + allCatalogs.add(armor); allCatalogs.add(wands); allCatalogs.add(rings); allCatalogs.add(artifacts); @@ -299,7 +350,7 @@ public class Catalogs { catalog.put(itemClass, true); } } + Badges.validateItemsIdentified(); } - } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java index 9921b605a..ddaf5b812 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java @@ -343,7 +343,7 @@ public class WndJournal extends WndTabbed { itemClasses = new ArrayList<>(Catalogs.weapons()); for (Class cls : itemClasses) known.put(cls, true); } else if (currentItemIdx == ARMOR_IDX){ - itemClasses = new ArrayList<>(Catalogs.armors()); + itemClasses = new ArrayList<>(Catalogs.armor()); for (Class cls : itemClasses) known.put(cls, true); } else if (currentItemIdx == WAND_IDX){ itemClasses = new ArrayList<>(Catalogs.wands()); diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc.properties index dd69333d0..c9c628af0 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc.properties @@ -13,11 +13,14 @@ badges$badge.level_reached_1=Level 6 reached badges$badge.level_reached_2=Level 12 reached badges$badge.level_reached_3=Level 18 reached badges$badge.level_reached_4=Level 24 reached +badges$badge.all_weapons_identified=All weapons identified +badges$badge.all_armor_identified=All armor identified +badges$badge.all_wands_identified=All wands identified +badges$badge.all_rings_identified=All rings identified +badges$badge.all_artifacts_identified=All artifacts identified badges$badge.all_potions_identified=All potions identified badges$badge.all_scrolls_identified=All scrolls identified -badges$badge.all_rings_identified=All rings identified -badges$badge.all_wands_identified=All wands identified -badges$badge.all_items_identified=All potions, scrolls, rings & wands identified +badges$badge.all_items_identified=All items identified badges$badge.all_bags_bought=All bags bought badges$badge.death_from_fire=Death from fire badges$badge.death_from_poison=Death from poison @@ -32,8 +35,6 @@ badges$badge.boss_slain_3=3rd boss slain badges$badge.boss_slain_4=4th boss slain badges$badge.boss_slain_1_all_classes=1st boss slain by Warrior, Mage, Rogue & Huntress badges$badge.boss_slain_3_all_subclasses=3rd boss slain by Gladiator, Berserker, Warlock, Battlemage, Freerunner, Assassin, Sniper & Warden -badges$badge.ring_of_haggler=Ring of Haggler obtained -badges$badge.ring_of_thorns=Ring of Thorns obtained badges$badge.strength_attained_1=13 points of Strength attained badges$badge.strength_attained_2=15 points of Strength attained badges$badge.strength_attained_3=17 points of Strength attained @@ -57,14 +58,12 @@ badges$badge.potions_cooked_4=12 potions cooked badges$badge.no_monsters_slain=Level completed without killing any monsters badges$badge.grim_weapon=Monster killed by a Grim weapon badges$badge.piranhas=6 piranhas killed -badges$badge.night_hunter=15 monsters killed at nighttime badges$badge.games_played_1=10 games played badges$badge.games_played_2=100 games played badges$badge.games_played_3=500 games played badges$badge.games_played_4=2000 games played badges$badge.happy_end=Happy end badges$badge.champion=Challenge won -badges$badge.supporter=Thanks for your support! challenges.no_food=On diet challenges.no_armor=Faith is my armor diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties index d3b3c6a0f..08b71c18d 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties @@ -2,10 +2,6 @@ windows.wndblacksmith.prompt=Ok, a deal is a deal, here's what I can do for you: windows.wndblacksmith.select=Reforge an item windows.wndblacksmith.reforge=Reforge them -windows.wndcatalogs.potions=Potions -windows.wndcatalogs.scrolls=Scrolls -windows.wndcatalogs.title=Catalogs - windows.wndchallenges.title=Challenges windows.wndchooseway.message=Which way will you follow? @@ -26,8 +22,6 @@ windows.wndgame.return=Return to Game windows.wndhero.stats=Stats windows.wndhero.buffs=Buffs windows.wndhero$statstab.title=Level %1$d %2$s -windows.wndhero$statstab.catalogs=Catalogs -windows.wndhero$statstab.journal=Journal windows.wndhero$statstab.exp=Experience windows.wndhero$statstab.str=Strength windows.wndhero$statstab.health=Health