v1.1.0: updated potions badge to be about alchemy in general
This commit is contained in:
parent
6d6f73e1c9
commit
ec8dde063d
|
@ -50,10 +50,10 @@ badges$badge.item_level_4=Item of level 12 acquired
|
|||
badges$badge.victory=Amulet of Yendor obtained
|
||||
badges$badge.victory_all_classes=Amulet of Yendor obtained by Warrior, Mage, Rogue & Huntress
|
||||
badges$badge.mastery_combo=10-hit combo
|
||||
badges$badge.potions_cooked_1=3 potions cooked
|
||||
badges$badge.potions_cooked_2=6 potions cooked
|
||||
badges$badge.potions_cooked_3=9 potions cooked
|
||||
badges$badge.potions_cooked_4=12 potions cooked
|
||||
badges$badge.items_crafted_1=5 items crafted
|
||||
badges$badge.items_crafted_2=10 items crafted
|
||||
badges$badge.items_crafted_3=15 items crafted
|
||||
badges$badge.items_crafted_4=20 items crafted
|
||||
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
|
||||
|
|
|
@ -145,7 +145,7 @@ windows.wndranking$statstab.depth=Maximum Depth
|
|||
windows.wndranking$statstab.enemies=Mobs Killed
|
||||
windows.wndranking$statstab.gold=Gold Collected
|
||||
windows.wndranking$statstab.food=Food Eaten
|
||||
windows.wndranking$statstab.alchemy=Potions Cooked
|
||||
windows.wndranking$statstab.alchemy=Items Crafted
|
||||
windows.wndranking$statstab.ankhs=Ankhs Used
|
||||
|
||||
windows.wndresurrect.title=Resurrection
|
||||
|
|
|
@ -64,7 +64,7 @@ public class Badges {
|
|||
LEVEL_REACHED_1 ( 9 ),
|
||||
STRENGTH_ATTAINED_1 ( 10 ),
|
||||
FOOD_EATEN_1 ( 11 ),
|
||||
POTIONS_COOKED_1 ( 12 ),
|
||||
ITEMS_CRAFTED_1 ( 12 ),
|
||||
BOSS_SLAIN_1 ( 13 ),
|
||||
DEATH_FROM_FIRE ( 14 ),
|
||||
DEATH_FROM_POISON ( 15 ),
|
||||
|
@ -87,8 +87,8 @@ public class Badges {
|
|||
STRENGTH_ATTAINED_3 ( 43 ),
|
||||
FOOD_EATEN_2 ( 44 ),
|
||||
FOOD_EATEN_3 ( 45 ),
|
||||
POTIONS_COOKED_2 ( 46 ),
|
||||
POTIONS_COOKED_3 ( 47 ),
|
||||
ITEMS_CRAFTED_2 ( 46 ),
|
||||
ITEMS_CRAFTED_3 ( 47 ),
|
||||
BOSS_SLAIN_2 ( 48 ),
|
||||
BOSS_SLAIN_3 ( 49 ),
|
||||
ALL_POTIONS_IDENTIFIED ( 50 ),
|
||||
|
@ -103,18 +103,17 @@ public class Badges {
|
|||
|
||||
//gold
|
||||
PIRANHAS ( 64 ),
|
||||
//these names are a bit outdated, but it doesn't really matter.
|
||||
BAG_BOUGHT_SEED_POUCH,
|
||||
BAG_BOUGHT_VELVET_POUCH,
|
||||
BAG_BOUGHT_SCROLL_HOLDER,
|
||||
BAG_BOUGHT_POTION_BANDOLIER,
|
||||
BAG_BOUGHT_WAND_HOLSTER,
|
||||
BAG_BOUGHT_MAGICAL_HOLSTER,
|
||||
ALL_BAGS_BOUGHT ( 65 ),
|
||||
MASTERY_COMBO ( 66 ),
|
||||
ITEM_LEVEL_4 ( 67 ),
|
||||
LEVEL_REACHED_4 ( 68 ),
|
||||
STRENGTH_ATTAINED_4 ( 69 ),
|
||||
FOOD_EATEN_4 ( 70 ),
|
||||
POTIONS_COOKED_4 ( 71 ),
|
||||
ITEMS_CRAFTED_4 ( 71 ),
|
||||
BOSS_SLAIN_4 ( 72 ),
|
||||
ALL_WEAPONS_IDENTIFIED ( 73 ),
|
||||
ALL_ARMOR_IDENTIFIED ( 74 ),
|
||||
|
@ -192,7 +191,14 @@ public class Badges {
|
|||
|
||||
private static final HashMap<String, String> renamedBadges = new HashMap<>();
|
||||
static{
|
||||
//no recently renamed badges
|
||||
//v1.1.0 (some names were from before 1.1.0, but conversion was added then)
|
||||
renamedBadges.put("BAG_BOUGHT_SEED_POUCH", "BAG_BOUGHT_VELVET_POUCH");
|
||||
renamedBadges.put("BAG_BOUGHT_WAND_HOLSTER", "BAG_BOUGHT_MAGICAL_HOLSTER");
|
||||
|
||||
renamedBadges.put("POTIONS_COOKED_1", "ITEMS_CRAFTED_1");
|
||||
renamedBadges.put("POTIONS_COOKED_2", "ITEMS_CRAFTED_2");
|
||||
renamedBadges.put("POTIONS_COOKED_3", "ITEMS_CRAFTED_3");
|
||||
renamedBadges.put("POTIONS_COOKED_4", "ITEMS_CRAFTED_4");
|
||||
}
|
||||
|
||||
public static HashSet<Badge> restore( Bundle bundle ) {
|
||||
|
@ -385,23 +391,23 @@ public class Badges {
|
|||
displayBadge( badge );
|
||||
}
|
||||
|
||||
public static void validatePotionsCooked() {
|
||||
public static void validateItemsCrafted() {
|
||||
Badge badge = null;
|
||||
|
||||
if (!local.contains( Badge.POTIONS_COOKED_1 ) && Statistics.potionsCooked >= 3) {
|
||||
badge = Badge.POTIONS_COOKED_1;
|
||||
if (!local.contains( Badge.ITEMS_CRAFTED_1 ) && Statistics.itemsCrafted >= 5) {
|
||||
badge = Badge.ITEMS_CRAFTED_1;
|
||||
local.add( badge );
|
||||
}
|
||||
if (!local.contains( Badge.POTIONS_COOKED_2 ) && Statistics.potionsCooked >= 6) {
|
||||
badge = Badge.POTIONS_COOKED_2;
|
||||
if (!local.contains( Badge.ITEMS_CRAFTED_2 ) && Statistics.itemsCrafted >= 10) {
|
||||
badge = Badge.ITEMS_CRAFTED_2;
|
||||
local.add( badge );
|
||||
}
|
||||
if (!local.contains( Badge.POTIONS_COOKED_3 ) && Statistics.potionsCooked >= 9) {
|
||||
badge = Badge.POTIONS_COOKED_3;
|
||||
if (!local.contains( Badge.ITEMS_CRAFTED_3 ) && Statistics.itemsCrafted >= 15) {
|
||||
badge = Badge.ITEMS_CRAFTED_3;
|
||||
local.add( badge );
|
||||
}
|
||||
if (!local.contains( Badge.POTIONS_COOKED_4 ) && Statistics.potionsCooked >= 12) {
|
||||
badge = Badge.POTIONS_COOKED_4;
|
||||
if (!local.contains( Badge.ITEMS_CRAFTED_4 ) && Statistics.itemsCrafted >= 20) {
|
||||
badge = Badge.ITEMS_CRAFTED_4;
|
||||
local.add( badge );
|
||||
}
|
||||
|
||||
|
@ -456,13 +462,13 @@ public class Badges {
|
|||
|
||||
Badge badge = null;
|
||||
if (bag instanceof VelvetPouch) {
|
||||
badge = Badge.BAG_BOUGHT_SEED_POUCH;
|
||||
badge = Badge.BAG_BOUGHT_VELVET_POUCH;
|
||||
} else if (bag instanceof ScrollHolder) {
|
||||
badge = Badge.BAG_BOUGHT_SCROLL_HOLDER;
|
||||
} else if (bag instanceof PotionBandolier) {
|
||||
badge = Badge.BAG_BOUGHT_POTION_BANDOLIER;
|
||||
} else if (bag instanceof MagicalHolster) {
|
||||
badge = Badge.BAG_BOUGHT_WAND_HOLSTER;
|
||||
badge = Badge.BAG_BOUGHT_MAGICAL_HOLSTER;
|
||||
}
|
||||
|
||||
if (badge != null) {
|
||||
|
@ -470,10 +476,10 @@ public class Badges {
|
|||
local.add( badge );
|
||||
|
||||
if (!local.contains( Badge.ALL_BAGS_BOUGHT ) &&
|
||||
local.contains( Badge.BAG_BOUGHT_SEED_POUCH ) &&
|
||||
local.contains( Badge.BAG_BOUGHT_VELVET_POUCH ) &&
|
||||
local.contains( Badge.BAG_BOUGHT_SCROLL_HOLDER ) &&
|
||||
local.contains( Badge.BAG_BOUGHT_POTION_BANDOLIER ) &&
|
||||
local.contains( Badge.BAG_BOUGHT_WAND_HOLSTER )) {
|
||||
local.contains( Badge.BAG_BOUGHT_MAGICAL_HOLSTER )) {
|
||||
|
||||
badge = Badge.ALL_BAGS_BOUGHT;
|
||||
local.add( badge );
|
||||
|
@ -911,7 +917,7 @@ public class Badges {
|
|||
{Badge.LEVEL_REACHED_1, Badge.LEVEL_REACHED_2, Badge.LEVEL_REACHED_3, Badge.LEVEL_REACHED_4},
|
||||
{Badge.STRENGTH_ATTAINED_1, Badge.STRENGTH_ATTAINED_2, Badge.STRENGTH_ATTAINED_3, Badge.STRENGTH_ATTAINED_4},
|
||||
{Badge.FOOD_EATEN_1, Badge.FOOD_EATEN_2, Badge.FOOD_EATEN_3, Badge.FOOD_EATEN_4},
|
||||
{Badge.POTIONS_COOKED_1, Badge.POTIONS_COOKED_2, Badge.POTIONS_COOKED_3, Badge.POTIONS_COOKED_4 },
|
||||
{Badge.ITEMS_CRAFTED_1, Badge.ITEMS_CRAFTED_2, Badge.ITEMS_CRAFTED_3, Badge.ITEMS_CRAFTED_4},
|
||||
{Badge.BOSS_SLAIN_1, Badge.BOSS_SLAIN_2, Badge.BOSS_SLAIN_3, Badge.BOSS_SLAIN_4},
|
||||
{Badge.GAMES_PLAYED_1, Badge.GAMES_PLAYED_2, Badge.GAMES_PLAYED_3, Badge.GAMES_PLAYED_4},
|
||||
{Badge.CHAMPION_1, Badge.CHAMPION_2, Badge.CHAMPION_3}
|
||||
|
@ -943,7 +949,7 @@ public class Badges {
|
|||
leaveBest( badges, Badge.STRENGTH_ATTAINED_1, Badge.STRENGTH_ATTAINED_2, Badge.STRENGTH_ATTAINED_3, Badge.STRENGTH_ATTAINED_4 );
|
||||
leaveBest( badges, Badge.FOOD_EATEN_1, Badge.FOOD_EATEN_2, Badge.FOOD_EATEN_3, Badge.FOOD_EATEN_4 );
|
||||
leaveBest( badges, Badge.ITEM_LEVEL_1, Badge.ITEM_LEVEL_2, Badge.ITEM_LEVEL_3, Badge.ITEM_LEVEL_4 );
|
||||
leaveBest( badges, Badge.POTIONS_COOKED_1, Badge.POTIONS_COOKED_2, Badge.POTIONS_COOKED_3, Badge.POTIONS_COOKED_4 );
|
||||
leaveBest( badges, Badge.ITEMS_CRAFTED_1, Badge.ITEMS_CRAFTED_2, Badge.ITEMS_CRAFTED_3, Badge.ITEMS_CRAFTED_4 );
|
||||
leaveBest( badges, Badge.GAMES_PLAYED_1, Badge.GAMES_PLAYED_2, Badge.GAMES_PLAYED_3, Badge.GAMES_PLAYED_4 );
|
||||
leaveBest( badges, Badge.CHAMPION_1, Badge.CHAMPION_2, Badge.CHAMPION_3 );
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class Statistics {
|
|||
public static int deepestFloor;
|
||||
public static int enemiesSlain;
|
||||
public static int foodEaten;
|
||||
public static int potionsCooked;
|
||||
public static int itemsCrafted;
|
||||
public static int piranhasKilled;
|
||||
public static int ankhsUsed;
|
||||
|
||||
|
@ -53,7 +53,7 @@ public class Statistics {
|
|||
deepestFloor = 0;
|
||||
enemiesSlain = 0;
|
||||
foodEaten = 0;
|
||||
potionsCooked = 0;
|
||||
itemsCrafted = 0;
|
||||
piranhasKilled = 0;
|
||||
ankhsUsed = 0;
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class Statistics {
|
|||
bundle.put( DEEPEST, deepestFloor );
|
||||
bundle.put( SLAIN, enemiesSlain );
|
||||
bundle.put( FOOD, foodEaten );
|
||||
bundle.put( ALCHEMY, potionsCooked );
|
||||
bundle.put( ALCHEMY, itemsCrafted );
|
||||
bundle.put( PIRANHAS, piranhasKilled );
|
||||
bundle.put( ANKHS, ankhsUsed );
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class Statistics {
|
|||
deepestFloor = bundle.getInt( DEEPEST );
|
||||
enemiesSlain = bundle.getInt( SLAIN );
|
||||
foodEaten = bundle.getInt( FOOD );
|
||||
potionsCooked = bundle.getInt( ALCHEMY );
|
||||
itemsCrafted = bundle.getInt( ALCHEMY );
|
||||
piranhasKilled = bundle.getInt( PIRANHAS );
|
||||
ankhsUsed = bundle.getInt( ANKHS );
|
||||
|
||||
|
|
|
@ -524,9 +524,6 @@ public class Potion extends Item {
|
|||
Dungeon.LimitedDrops.COOKING_HP.count++;
|
||||
}
|
||||
|
||||
Statistics.potionsCooked++;
|
||||
Badges.validatePotionsCooked();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -483,6 +483,9 @@ public class AlchemyScene extends PixelScene {
|
|||
}
|
||||
}
|
||||
|
||||
Statistics.itemsCrafted++;
|
||||
Badges.validateItemsCrafted();
|
||||
|
||||
try {
|
||||
Dungeon.saveAll();
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -242,7 +242,7 @@ public class WndRanking extends WndTabbed {
|
|||
pos += GAP;
|
||||
|
||||
pos = statSlot( this, Messages.get(this, "food"), Integer.toString( Statistics.foodEaten ), pos );
|
||||
pos = statSlot( this, Messages.get(this, "alchemy"), Integer.toString( Statistics.potionsCooked ), pos );
|
||||
pos = statSlot( this, Messages.get(this, "alchemy"), Integer.toString( Statistics.itemsCrafted ), pos );
|
||||
pos = statSlot( this, Messages.get(this, "ankhs"), Integer.toString( Statistics.ankhsUsed ), pos );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user