v2.5.0: redesigned badges for the new catalog
This includes a lore tweak to the final halls page
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -161,7 +161,7 @@ journal.document.halls_king.new_king.body=I AM KING, AHAHAHAHAAA!\n\nThey just l
|
||||
journal.document.halls_king.thing.title=The Thing
|
||||
journal.document.halls_king.thing.body=There's a problem. Thymor was dispatched without effort, but it seems my scrounging in the outer planes did not go unnoticed.\n\nSome... 'thing'... has been attracted to my world and is starting to force itself through at the bottom of the lower halls. To complicate things further, that is the exact location where I stored the amulet! Such a spiteful creature, why must it try to deny me my power when there is plenty out there still to take?\n\nDespite my power though, I don't think I can just charge in and fight it. Its true power is unfathomable, but there must be some way to limit it. I WILL DEFEND MY PRIZE!
|
||||
journal.document.halls_king.attrition.title=Attrition
|
||||
journal.document.halls_king.attrition.body=I have a plan for dealing with the thing. Its power is infinite, but its ability to encroach on this world is not. It's relying on minions and avatars to do its bidding while it tries to build enough power to take the amulet.\n\nWhile I don't possess the amulet physically I still have full control over its power. With the entire dwarven city at my disposal I also have a numbers advantage. I can simply keep sending soldiers to prevent it from seizing the amulet and steadily win this war through attrition!\n\nI DON'T CARE HOW LONG IT TAKES, I WILL OUTLAST YOU YOG-DZEWA!
|
||||
journal.document.halls_king.attrition.body=I have a plan for dealing with the thing. Its power is infinite, but its ability to encroach on this world is not. It's relying on minions and avatars to do its bidding while it tries to build enough power to take the amulet.\n\nWhile I don't possess the amulet physically I still have full control over its power. With the entire dwarven city at my disposal I also have a numbers advantage. I can simply keep sending soldiers to prevent it from seizing the amulet and steadily win this war through attrition!\n\nI, RODNEY, KING OF DWARVES, WILL OUTLAST YOU YOG-DZEWA!
|
||||
|
||||
journal.notes$landmark.well_of_health=well of health
|
||||
journal.notes$landmark.well_of_awareness=well of awareness
|
||||
|
||||
@@ -164,6 +164,25 @@ badges$badge.high_score_4.title=Master Score Chaser
|
||||
badges$badge.high_score_4.desc=End a run with a score of 250,000 or higher
|
||||
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.researcher_1.title=Novice Researcher
|
||||
badges$badge.researcher_1.desc=Fill in 40 catalog entries in your journal
|
||||
badges$badge.researcher_2.title=Adept Researcher
|
||||
badges$badge.researcher_2.desc=Fill in 80 catalog entries in your journal
|
||||
badges$badge.researcher_3.title=Expert Researcher
|
||||
badges$badge.researcher_3.desc=Fill in 160 catalog entries in your journal
|
||||
badges$badge.researcher_4.title=Master Researcher
|
||||
badges$badge.researcher_4.desc=Fill in 320 catalog entries in your journal
|
||||
badges$badge.researcher_5.title=Grandmaster Researcher
|
||||
badges$badge.researcher_5.desc=Fill in every catalog entry in your journal
|
||||
badges$badge.catalog_one_equipment.title=Well Equipped
|
||||
badges$badge.catalog_one_equipment.desc=Fill in one catalog entry for every type of equipment item in your journal
|
||||
badges$badge.catalog_potions_scrolls.title=Every Glyph and Color
|
||||
badges$badge.catalog_potions_scrolls.desc=Identify every regular potion and scroll in one run
|
||||
badges$badge.all_rare_enemies.title=Big Game Hunter
|
||||
badges$badge.all_rare_enemies.desc=Fill in all catalog entries for rare enemies in your journal
|
||||
badges$badge.rodney.title=Not So Intimidating Now
|
||||
badges$badge.rodney.desc=Learn the true name of the King of Dwarves
|
||||
|
||||
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
|
||||
|
||||
@@ -29,9 +29,13 @@ 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.potions.Potion;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.remains.RemainsItem;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Bestiary;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Catalog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Document;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
@@ -74,13 +78,15 @@ public class Badges {
|
||||
FOOD_EATEN_1 ( 13 ),
|
||||
ITEMS_CRAFTED_1 ( 14 ),
|
||||
BOSS_SLAIN_1 ( 15 ),
|
||||
DEATH_FROM_FIRE ( 16 ),
|
||||
DEATH_FROM_POISON ( 17 ),
|
||||
DEATH_FROM_GAS ( 18 ),
|
||||
DEATH_FROM_HUNGER ( 19 ),
|
||||
DEATH_FROM_FALLING ( 20 ),
|
||||
GAMES_PLAYED_1 ( 21, true ),
|
||||
HIGH_SCORE_1 ( 22 ),
|
||||
CATALOG_ONE_EQUIPMENT ( 16, true ),
|
||||
DEATH_FROM_FIRE ( 17 ),
|
||||
DEATH_FROM_POISON ( 18 ),
|
||||
DEATH_FROM_GAS ( 19 ),
|
||||
DEATH_FROM_HUNGER ( 20 ),
|
||||
DEATH_FROM_FALLING ( 21 ),
|
||||
RESEARCHER_1 ( 22, true ),
|
||||
GAMES_PLAYED_1 ( 23, true ),
|
||||
HIGH_SCORE_1 ( 24 ),
|
||||
|
||||
//silver
|
||||
NO_MONSTERS_SLAIN ( 32 ),
|
||||
@@ -101,17 +107,19 @@ public class Badges {
|
||||
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 ),
|
||||
ALL_POTIONS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
ALL_SCROLLS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
CATALOG_POTIONS_SCROLLS ( 50 ),
|
||||
DEATH_FROM_ENEMY_MAGIC ( 51 ),
|
||||
DEATH_FROM_FRIENDLY_MAGIC ( 52 ),
|
||||
DEATH_FROM_SACRIFICE ( 53 ),
|
||||
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 ( 55, true ),
|
||||
BOSS_SLAIN_1_ALL_CLASSES ( 54, true ),
|
||||
RESEARCHER_2 ( 55, true ),
|
||||
GAMES_PLAYED_2 ( 56, true ),
|
||||
HIGH_SCORE_2 ( 57 ),
|
||||
|
||||
@@ -135,12 +143,14 @@ public class Badges {
|
||||
ITEMS_CRAFTED_4 ( 76 ),
|
||||
ITEMS_CRAFTED_5 ( 77 ),
|
||||
BOSS_SLAIN_4 ( 78 ),
|
||||
ALL_RINGS_IDENTIFIED ( 79 ),
|
||||
ALL_ARTIFACTS_IDENTIFIED ( 80 ),
|
||||
DEATH_FROM_GRIM_TRAP ( 81 ), //also disintegration traps
|
||||
VICTORY ( 82 ),
|
||||
BOSS_CHALLENGE_1 ( 83 ),
|
||||
BOSS_CHALLENGE_2 ( 84 ),
|
||||
ALL_RINGS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
ALL_ARTIFACTS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
ALL_RARE_ENEMIES ( 79 ),
|
||||
DEATH_FROM_GRIM_TRAP ( 80 ), //also disintegration traps
|
||||
VICTORY ( 81 ),
|
||||
BOSS_CHALLENGE_1 ( 82 ),
|
||||
BOSS_CHALLENGE_2 ( 83 ),
|
||||
RESEARCHER_3 ( 84, true ),
|
||||
GAMES_PLAYED_3 ( 85, true ),
|
||||
HIGH_SCORE_3 ( 86 ),
|
||||
|
||||
@@ -149,17 +159,18 @@ public class Badges {
|
||||
LEVEL_REACHED_5 ( 97 ),
|
||||
HAPPY_END ( 98 ),
|
||||
HAPPY_END_REMAINS ( 99 ),
|
||||
ALL_WEAPONS_IDENTIFIED ( 100 ),
|
||||
ALL_ARMOR_IDENTIFIED ( 101 ),
|
||||
ALL_WANDS_IDENTIFIED ( 102 ),
|
||||
ALL_ITEMS_IDENTIFIED ( 103, true ),
|
||||
RODNEY ( 100, true ),
|
||||
ALL_WEAPONS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
ALL_ARMOR_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
ALL_WANDS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
ALL_ITEMS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
VICTORY_WARRIOR,
|
||||
VICTORY_MAGE,
|
||||
VICTORY_ROGUE,
|
||||
VICTORY_HUNTRESS,
|
||||
VICTORY_DUELIST,
|
||||
VICTORY_ALL_CLASSES ( 104, true ),
|
||||
DEATH_FROM_ALL ( 105, true ),
|
||||
VICTORY_ALL_CLASSES ( 101, true ),
|
||||
DEATH_FROM_ALL ( 102, true ),
|
||||
BOSS_SLAIN_3_GLADIATOR,
|
||||
BOSS_SLAIN_3_BERSERKER,
|
||||
BOSS_SLAIN_3_WARLOCK,
|
||||
@@ -170,19 +181,21 @@ public class Badges {
|
||||
BOSS_SLAIN_3_WARDEN,
|
||||
BOSS_SLAIN_3_CHAMPION,
|
||||
BOSS_SLAIN_3_MONK,
|
||||
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 ),
|
||||
BOSS_SLAIN_3_ALL_SUBCLASSES ( 103, true ),
|
||||
BOSS_CHALLENGE_3 ( 104 ),
|
||||
BOSS_CHALLENGE_4 ( 105 ),
|
||||
RESEARCHER_4 ( 106, true ),
|
||||
GAMES_PLAYED_4 ( 107, true ),
|
||||
HIGH_SCORE_4 ( 108 ),
|
||||
CHAMPION_1 ( 109 ),
|
||||
|
||||
//diamond
|
||||
BOSS_CHALLENGE_5 ( 120 ),
|
||||
GAMES_PLAYED_5 ( 121, true ),
|
||||
HIGH_SCORE_5 ( 122 ),
|
||||
CHAMPION_2 ( 123 ),
|
||||
CHAMPION_3 ( 124 );
|
||||
RESEARCHER_5 ( 121, true ),
|
||||
GAMES_PLAYED_5 ( 122, true ),
|
||||
HIGH_SCORE_5 ( 123 ),
|
||||
CHAMPION_2 ( 124 ),
|
||||
CHAMPION_3 ( 125 );
|
||||
|
||||
public boolean meta;
|
||||
|
||||
@@ -586,31 +599,84 @@ public class Badges {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateItemsIdentified() {
|
||||
|
||||
|
||||
//several badges all tie into catalog completion
|
||||
public static void validateCatalogBadges(){
|
||||
|
||||
int totalSeen = 0;
|
||||
int totalThings = 0;
|
||||
|
||||
for (Catalog cat : Catalog.values()){
|
||||
if (cat.totalItems() == cat.totalSeen()){
|
||||
Badge b = Catalog.catalogBadges.get(cat);
|
||||
if (!isUnlocked(b)){
|
||||
displayBadge(b);
|
||||
totalSeen += cat.totalSeen();
|
||||
totalThings += cat.totalItems();
|
||||
}
|
||||
|
||||
for (Bestiary cat : Bestiary.values()){
|
||||
totalSeen += cat.totalSeen();
|
||||
totalThings += cat.totalEntities();
|
||||
}
|
||||
|
||||
for (Document doc : Document.values()){
|
||||
if (!doc.isLoreDoc()) {
|
||||
for (String page : doc.pageNames()){
|
||||
if (doc.isPageFound(page)) totalSeen++;
|
||||
totalThings++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isUnlocked( Badge.ALL_WEAPONS_IDENTIFIED ) &&
|
||||
isUnlocked( Badge.ALL_ARMOR_IDENTIFIED ) &&
|
||||
isUnlocked( Badge.ALL_WANDS_IDENTIFIED ) &&
|
||||
isUnlocked( Badge.ALL_RINGS_IDENTIFIED ) &&
|
||||
isUnlocked( Badge.ALL_ARTIFACTS_IDENTIFIED ) &&
|
||||
isUnlocked( Badge.ALL_POTIONS_IDENTIFIED ) &&
|
||||
isUnlocked( Badge.ALL_SCROLLS_IDENTIFIED )) {
|
||||
|
||||
Badge badge = Badge.ALL_ITEMS_IDENTIFIED;
|
||||
if (!isUnlocked( badge )) {
|
||||
displayBadge( badge );
|
||||
//overall unlock badges
|
||||
Badge badge = null;
|
||||
if (totalSeen >= 40) {
|
||||
badge = Badge.RESEARCHER_1;
|
||||
}
|
||||
if (totalSeen >= 80) {
|
||||
unlock(badge);
|
||||
badge = Badge.RESEARCHER_2;
|
||||
}
|
||||
if (totalSeen >= 160) {
|
||||
unlock(badge);
|
||||
badge = Badge.RESEARCHER_3;
|
||||
}
|
||||
if (totalSeen >= 360) {
|
||||
unlock(badge);
|
||||
badge = Badge.RESEARCHER_4;
|
||||
}
|
||||
if (totalSeen == totalThings) {
|
||||
unlock(badge);
|
||||
badge = Badge.RESEARCHER_5;
|
||||
}
|
||||
displayBadge( badge );
|
||||
|
||||
//specific task badges
|
||||
|
||||
boolean qualified = true;
|
||||
for (Catalog cat : Catalog.equipmentCatalogs) {
|
||||
if (cat != Catalog.ENCHANTMENTS && cat != Catalog.GLYPHS) {
|
||||
if (cat.totalSeen() == 0) {
|
||||
qualified = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (qualified) {
|
||||
displayBadge(Badge.CATALOG_ONE_EQUIPMENT);
|
||||
}
|
||||
|
||||
//doesn't actually use catalogs, but triggers at the same time effectively
|
||||
if (!local.contains(Badge.CATALOG_POTIONS_SCROLLS) && Potion.allKnown() && Scroll.allKnown()){
|
||||
local.add(Badge.CATALOG_POTIONS_SCROLLS);
|
||||
displayBadge(Badge.CATALOG_POTIONS_SCROLLS);
|
||||
}
|
||||
|
||||
if (Bestiary.RARE.totalEntities() == Bestiary.RARE.totalSeen()){
|
||||
displayBadge(Badge.ALL_RARE_ENEMIES);
|
||||
}
|
||||
|
||||
if (Document.HALLS_KING.isPageRead(Document.KING_ATTRITION)){
|
||||
displayBadge(Badge.RODNEY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void validateDeathFromFire() {
|
||||
@@ -1100,6 +1166,7 @@ public class Badges {
|
||||
{Badge.FOOD_EATEN_1, Badge.FOOD_EATEN_2, Badge.FOOD_EATEN_3, Badge.FOOD_EATEN_4, Badge.FOOD_EATEN_5},
|
||||
{Badge.ITEMS_CRAFTED_1, Badge.ITEMS_CRAFTED_2, Badge.ITEMS_CRAFTED_3, Badge.ITEMS_CRAFTED_4, Badge.ITEMS_CRAFTED_5},
|
||||
{Badge.BOSS_SLAIN_1, Badge.BOSS_SLAIN_2, Badge.BOSS_SLAIN_3, Badge.BOSS_SLAIN_4},
|
||||
{Badge.RESEARCHER_1, Badge.RESEARCHER_2, Badge.RESEARCHER_3, Badge.RESEARCHER_4, Badge.RESEARCHER_5},
|
||||
{Badge.HIGH_SCORE_1, Badge.HIGH_SCORE_2, Badge.HIGH_SCORE_3, Badge.HIGH_SCORE_4, Badge.HIGH_SCORE_5},
|
||||
{Badge.GAMES_PLAYED_1, Badge.GAMES_PLAYED_2, Badge.GAMES_PLAYED_3, Badge.GAMES_PLAYED_4, Badge.GAMES_PLAYED_5},
|
||||
{Badge.CHAMPION_1, Badge.CHAMPION_2, Badge.CHAMPION_3}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ShatteredPixelDungeon extends Game {
|
||||
public static final int v2_1_4 = 737; //iOS was 737, other platforms were 736
|
||||
public static final int v2_2_1 = 755; //iOS was 755 (also called v2.2.2), other platforms were 754
|
||||
public static final int v2_3_2 = 768;
|
||||
public static final int v2_4_0 = 780;
|
||||
public static final int v2_4_2 = 782;
|
||||
|
||||
public ShatteredPixelDungeon( PlatformSupport platform ) {
|
||||
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.journal;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.huntress.SpiritHawk;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.rogue.ShadowClone;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.rogue.SmokeBomb;
|
||||
@@ -213,14 +214,14 @@ public enum Bestiary {
|
||||
DwarfKing.class,
|
||||
YogDzewa.Larva.class, YogFist.BurningFist.class, YogFist.SoiledFist.class, YogFist.RottingFist.class, YogFist.RustedFist.class,YogFist.BrightFist.class, YogFist.DarkFist.class, YogDzewa.class);
|
||||
|
||||
UNIVERSAL.addEntities(Wraith.class, Piranha.class, Mimic.class, GoldenMimic.class, Statue.class, GuardianTrap.Guardian.class, SentryRoom.Sentry.class);
|
||||
UNIVERSAL.addEntities(Wraith.class, Piranha.class, Mimic.class, GoldenMimic.class, EbonyMimic.class, Statue.class, GuardianTrap.Guardian.class, SentryRoom.Sentry.class);
|
||||
|
||||
RARE.addEntities(Albino.class, CausticSlime.class,
|
||||
Bandit.class, SpectralNecromancer.class,
|
||||
ArmoredBrute.class, DM201.class,
|
||||
Elemental.ChaosElemental.class, Senior.class,
|
||||
Acidic.class,
|
||||
TormentedSpirit.class, PhantomPiranha.class, CrystalMimic.class, EbonyMimic.class, ArmoredStatue.class);
|
||||
TormentedSpirit.class, PhantomPiranha.class, CrystalMimic.class, ArmoredStatue.class);
|
||||
|
||||
QUEST.addEntities(FetidRat.class, GnollTrickster.class, GreatCrab.class,
|
||||
Elemental.NewbornFireElemental.class, RotLasher.class, RotHeart.class,
|
||||
@@ -282,7 +283,7 @@ public enum Bestiary {
|
||||
classConversions.put(YogDzewa.YogScorpio.class, Scorpio.class);
|
||||
}
|
||||
|
||||
public static boolean setSeen(Class<?> mobClass){
|
||||
public static void setSeen(Class<?> mobClass){
|
||||
if (classConversions.containsKey(mobClass)){
|
||||
mobClass = classConversions.get(mobClass);
|
||||
}
|
||||
@@ -294,7 +295,7 @@ public enum Bestiary {
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
Badges.validateCatalogBadges();
|
||||
}
|
||||
|
||||
public static void trackEncounter(Class<?> mobClass){
|
||||
@@ -309,6 +310,7 @@ public enum Bestiary {
|
||||
}
|
||||
}
|
||||
}
|
||||
Badges.validateCatalogBadges();
|
||||
}
|
||||
|
||||
private static final String BESTIARY_CLASSES = "bestiary_classes";
|
||||
|
||||
@@ -259,6 +259,7 @@ public enum Catalog {
|
||||
|
||||
}
|
||||
|
||||
//old badges for pre-2.5
|
||||
public static LinkedHashMap<Catalog, Badges.Badge> catalogBadges = new LinkedHashMap<>();
|
||||
static {
|
||||
catalogBadges.put(MELEE_WEAPONS, Badges.Badge.ALL_WEAPONS_IDENTIFIED);
|
||||
@@ -316,7 +317,7 @@ public enum Catalog {
|
||||
Journal.saveNeeded = true;
|
||||
}
|
||||
}
|
||||
Badges.validateItemsIdentified();
|
||||
Badges.validateCatalogBadges();
|
||||
}
|
||||
|
||||
private static final String CATALOG_ITEMS = "catalog_items";
|
||||
@@ -327,16 +328,11 @@ public enum Catalog {
|
||||
|
||||
ArrayList<Class> seen = new ArrayList<>();
|
||||
|
||||
//if we have identified all items of a set, we use the badge to keep track instead.
|
||||
//if (!Badges.isUnlocked(Badges.Badge.ALL_ITEMS_IDENTIFIED)) {
|
||||
for (Catalog cat : values()) {
|
||||
//if (!Badges.isUnlocked(catalogBadges.get(cat))) {
|
||||
for (Class<?> item : cat.items()) {
|
||||
if (cat.seen.get(item)) seen.add(item);
|
||||
}
|
||||
//}
|
||||
for (Catalog cat : values()) {
|
||||
for (Class<?> item : cat.items()) {
|
||||
if (cat.seen.get(item)) seen.add(item);
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
bundle.put( CATALOG_ITEMS, seen.toArray(new Class[0]) );
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.journal;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
@@ -66,6 +67,7 @@ public enum Document {
|
||||
if (pagesStates.containsKey(page) && pagesStates.get(page) == NOT_FOUND){
|
||||
pagesStates.put(page, FOUND);
|
||||
Journal.saveNeeded = true;
|
||||
Badges.validateCatalogBadges();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -88,6 +90,19 @@ public enum Document {
|
||||
return deletePage( pagesStates.keySet().toArray(new String[0])[pageIdx] );
|
||||
}
|
||||
|
||||
public boolean unreadPage( String page ){
|
||||
if (pagesStates.containsKey(page) && pagesStates.get(page) == READ){
|
||||
pagesStates.put(page, FOUND);
|
||||
Journal.saveNeeded = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean unreadPage( int pageIdx ) {
|
||||
return deletePage( pagesStates.keySet().toArray(new String[0])[pageIdx] );
|
||||
}
|
||||
|
||||
public boolean isPageFound( String page ){
|
||||
return pagesStates.containsKey(page) && pagesStates.get(page) > NOT_FOUND;
|
||||
}
|
||||
@@ -118,6 +133,7 @@ public enum Document {
|
||||
if (pagesStates.containsKey(page)){
|
||||
pagesStates.put(page, READ);
|
||||
Journal.saveNeeded = true;
|
||||
Badges.validateCatalogBadges();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -233,6 +249,8 @@ public enum Document {
|
||||
|
||||
public static final String GUIDE_SEARCHING = "Searching";
|
||||
|
||||
public static final String KING_ATTRITION = "attrition";
|
||||
|
||||
//pages and default states
|
||||
static {
|
||||
boolean debug = DeviceCompat.isDebug();
|
||||
@@ -305,7 +323,7 @@ public enum Document {
|
||||
HALLS_KING.pagesStates.put("ritual", debug ? READ : NOT_FOUND);
|
||||
HALLS_KING.pagesStates.put("new_king", debug ? READ : NOT_FOUND);
|
||||
HALLS_KING.pagesStates.put("thing", debug ? READ : NOT_FOUND);
|
||||
HALLS_KING.pagesStates.put("attrition", debug ? READ : NOT_FOUND);
|
||||
HALLS_KING.pagesStates.put(KING_ATTRITION, debug ? NOT_FOUND : NOT_FOUND);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ import java.util.Collections;
|
||||
|
||||
public class WelcomeScene extends PixelScene {
|
||||
|
||||
private static final int LATEST_UPDATE = ShatteredPixelDungeon.v2_4_0;
|
||||
private static final int LATEST_UPDATE = ShatteredPixelDungeon.v2_4_2;
|
||||
|
||||
//used so that the game does not keep showing the window forever if cleaning fails
|
||||
private static boolean triedCleaningTemp = false;
|
||||
@@ -239,6 +239,13 @@ public class WelcomeScene extends PixelScene {
|
||||
Badges.loadGlobal();
|
||||
Journal.loadGlobal();
|
||||
|
||||
//Dwarf King's final journal entry changed, set it as un-read
|
||||
if (previousVersion <= ShatteredPixelDungeon.v2_4_2){
|
||||
if (Document.HALLS_KING.isPageRead(Document.KING_ATTRITION)){
|
||||
Document.HALLS_KING.unreadPage(Document.KING_ATTRITION);
|
||||
}
|
||||
}
|
||||
|
||||
//pre-unlock Duelist for those who already have a win
|
||||
if (previousVersion <= ShatteredPixelDungeon.v2_0_2){
|
||||
if (Badges.isUnlocked(Badges.Badge.VICTORY) && !Badges.isUnlocked(Badges.Badge.UNLOCK_DUELIST)){
|
||||
|
||||
@@ -80,7 +80,6 @@ public class WndJournal extends WndTabbed {
|
||||
private AlchemyTab alchemyTab;
|
||||
private NotesTab notesTab;
|
||||
private CatalogTab catalogTab;
|
||||
private LoreTab loreTab;
|
||||
|
||||
public static int last_index = 0;
|
||||
|
||||
@@ -109,11 +108,6 @@ public class WndJournal extends WndTabbed {
|
||||
add(catalogTab);
|
||||
catalogTab.setRect(0, 0, width, height);
|
||||
catalogTab.updateList();
|
||||
|
||||
/*loreTab = new LoreTab();
|
||||
add(loreTab);
|
||||
loreTab.setRect(0, 0, width, height);
|
||||
loreTab.updateList();*/
|
||||
|
||||
Tab[] tabs = {
|
||||
new IconTab( new ItemSprite(ItemSpriteSheet.MASTERY, null) ) {
|
||||
@@ -143,16 +137,9 @@ public class WndJournal extends WndTabbed {
|
||||
catalogTab.active = catalogTab.visible = value;
|
||||
if (value) last_index = 3;
|
||||
}
|
||||
},
|
||||
/*new IconTab( new ItemSprite(ItemSpriteSheet.GUIDE_PAGE, null) ) {
|
||||
protected void select( boolean value ) {
|
||||
super.select( value );
|
||||
loreTab.active = loreTab.visible = value;
|
||||
if (value) last_index = 4;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
for (Tab tab : tabs) {
|
||||
add( tab );
|
||||
}
|
||||
@@ -169,7 +156,6 @@ public class WndJournal extends WndTabbed {
|
||||
alchemyTab.layout();
|
||||
notesTab.layout();
|
||||
catalogTab.layout();
|
||||
loreTab.layout();
|
||||
}
|
||||
|
||||
public static class GuideTab extends Component {
|
||||
@@ -872,6 +858,7 @@ public class WndJournal extends WndTabbed {
|
||||
Image sprite = new Image(icon);
|
||||
if (seen) {
|
||||
GameScene.show(new WndStory(sprite, doc.pageTitle(page), doc.pageBody(page)));
|
||||
doc.readPage(page);
|
||||
hardLightBG(1, 1, 1);
|
||||
} else {
|
||||
GameScene.show(new WndJournalItem(sprite, "???", Messages.get(CatalogTab.class, "not_seen_lore")));
|
||||
|
||||
Reference in New Issue
Block a user