v1.2.0: badges now have names

This commit is contained in:
Evan Debenham 2022-03-03 13:36:36 -05:00
parent d2f8d95f51
commit c7976b9972
5 changed files with 156 additions and 82 deletions

View File

@ -1,73 +1,139 @@
badges.endorsed=Badge endorsed: %s
badges.new_super=New super badge: %s
badges.new=New badge: %s
badges$badge.monsters_slain_1=10 enemies slain
badges$badge.monsters_slain_2=50 enemies slain
badges$badge.monsters_slain_3=150 enemies slain
badges$badge.monsters_slain_4=250 enemies slain
badges$badge.gold_collected_1=100 gold collected
badges$badge.gold_collected_2=500 gold collected
badges$badge.gold_collected_3=2500 gold collected
badges$badge.gold_collected_4=7500 gold collected
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_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
badges$badge.death_from_gas=Death from toxic gas
badges$badge.death_from_hunger=Death from hunger
badges$badge.death_from_glyph=Death from deferred damage
badges$badge.death_from_falling=Death from falling down
badges$badge.yasd=Death from fire, poison, toxic gas, hunger, glyph, and falling
badges$badge.boss_slain_1=1st boss slain
badges$badge.boss_slain_2=2nd boss slain
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.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
badges$badge.strength_attained_4=19 points of Strength attained
badges$badge.food_eaten_1=10 pieces of food eaten
badges$badge.food_eaten_2=20 pieces of food eaten
badges$badge.food_eaten_3=30 pieces of food eaten
badges$badge.food_eaten_4=40 pieces of food eaten
badges$badge.item_level_1=Item of level 3 acquired
badges$badge.item_level_2=Item of level 6 acquired
badges$badge.item_level_3=Item of level 9 acquired
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.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
badges$badge.games_played_1=10 games played
badges$badge.games_played_2=50 games played
badges$badge.games_played_3=250 games played
badges$badge.games_played_4=1000 games played
badges$badge.happy_end=Happy end
badges$badge.champion_1=Won with a Challenge
badges$badge.champion_2=Won with 3 Challenges
badges$badge.champion_3=Won with 6 Challenges
badges$badge.unlock_mage=Unlocked the Mage
badges$badge.unlock_rogue=Unlocked the Rogue
badges$badge.unlock_huntress=Unlocked the Huntress
badges.new=Badge unlocked!: %s
badges$badge.monsters_slain_1.title=Novice Monster Hunter
badges$badge.monsters_slain_1.desc=Defeat 10 enemies in one run
badges$badge.monsters_slain_2.title=Adept Monster Hunter
badges$badge.monsters_slain_2.desc=Defeat 50 enemies in one run
badges$badge.monsters_slain_3.title=Expert Monster Hunter
badges$badge.monsters_slain_3.desc=Defeat 150 enemies in one run
badges$badge.monsters_slain_4.title=Master Monster Hunter
badges$badge.monsters_slain_4.desc=Defeat 250 enemies in one run
badges$badge.gold_collected_1.title=Novice Treasure Hunter
badges$badge.gold_collected_1.desc=Collect 100 gold in one run
badges$badge.gold_collected_2.title=Adept Treasure Hunter
badges$badge.gold_collected_2.desc=Collect 500 gold in one run
badges$badge.gold_collected_3.title=Expert Treasure Hunter
badges$badge.gold_collected_3.desc=Collect 2500 gold in one run
badges$badge.gold_collected_4.title=Master Treasure Hunter
badges$badge.gold_collected_4.desc=Collect 7500 gold in one run
badges$badge.level_reached_1.title=Novice Adventurer
badges$badge.level_reached_1.desc=Reach level 6
badges$badge.level_reached_2.title=Adept Adventurer
badges$badge.level_reached_2.desc=Reach level 12
badges$badge.level_reached_3.title=Expert Adventurer
badges$badge.level_reached_3.desc=Reach level 18
badges$badge.level_reached_4.title=Master Adventurer
badges$badge.level_reached_4.desc=Reach level 24
badges$badge.all_weapons_identified.title=Weapon Researcher
badges$badge.all_weapons_identified.desc=Identify all weapons in your journal
badges$badge.all_armor_identified.title=Armor Researcher
badges$badge.all_armor_identified.desc=Identify all armors in your journal
badges$badge.all_wands_identified.title=Wand Researcher
badges$badge.all_wands_identified.desc=Identify all wands in your journal
badges$badge.all_rings_identified.title=Ring Researcher
badges$badge.all_rings_identified.desc=Identify all rings in your journal
badges$badge.all_artifacts_identified.title=Artifact Researcher
badges$badge.all_artifacts_identified.desc=Identify all artifacts in your journal
badges$badge.all_potions_identified.title=Potion Researcher
badges$badge.all_potions_identified.desc=Identify all potions in your journal
badges$badge.all_scrolls_identified.title=Scroll Researcher
badges$badge.all_scrolls_identified.desc=Identify all scrolls in your journal
badges$badge.all_items_identified.title=Master Researcher
badges$badge.all_items_identified.desc=Identify all items in your journal
badges$badge.all_bags_bought.title=Pack Mule
badges$badge.all_bags_bought.desc=Fully expand your inventory
badges$badge.death_from_fire.title=Burned
badges$badge.death_from_fire.desc=Die from fire
badges$badge.death_from_poison.title=Poisoned
badges$badge.death_from_poison.desc=Die from poison
badges$badge.death_from_gas.title=Suffocated
badges$badge.death_from_gas.desc=Die from toxic gas
badges$badge.death_from_hunger.title=Starved
badges$badge.death_from_hunger.desc=Die from hunger
badges$badge.death_from_glyph.title=Deferred Death
badges$badge.death_from_glyph.desc=Die from deferred damage
badges$badge.death_from_falling.title=Pancaked
badges$badge.death_from_falling.desc=Die from falling down
badges$badge.yasd.title=Yet Another Sad Death
badges$badge.yasd.desc=Die to fire, poison, toxic gas, hunger, deferred damage, and falling
badges$badge.boss_slain_1.title=Slime janitor
badges$badge.boss_slain_1.desc=Defeat the boss at the end of the sewers
badges$badge.boss_slain_2.title=Prison Warden
badges$badge.boss_slain_2.desc=Defeat the boss at the end of the prison
badges$badge.boss_slain_3.title=Metal Scrapper
badges$badge.boss_slain_3.desc=Defeat the boss at the end of the caves
badges$badge.boss_slain_4.title=King Conqueror
badges$badge.boss_slain_4.desc=Defeat the boss at the end of the city
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 the Warrior, Mage, Rogue & Huntress
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 the Gladiator, Berserker, Warlock, Battlemage, Freerunner, Assassin, Sniper & Warden
badges$badge.strength_attained_1.title=Novice Bodybuilder
badges$badge.strength_attained_1.desc=Reach 13 points of strength
badges$badge.strength_attained_2.title=Adept Bodybuilder
badges$badge.strength_attained_2.desc=Reach 15 points of strength
badges$badge.strength_attained_3.title=Expert Bodybuilder
badges$badge.strength_attained_3.desc=Reach 17 points of strength
badges$badge.strength_attained_4.title=Master Bodybuilder
badges$badge.strength_attained_4.desc=Reach 19 points of strength
badges$badge.food_eaten_1.title=Novice Gourmet
badges$badge.food_eaten_1.desc=Eat 10 pieces of food in one run
badges$badge.food_eaten_2.title=Adept Gourmet
badges$badge.food_eaten_2.desc=Eat 20 pieces of food in one run
badges$badge.food_eaten_3.title=Expert Gourmet
badges$badge.food_eaten_3.desc=Eat 30 pieces of food in one run
badges$badge.food_eaten_4.title=Master Gourmet
badges$badge.food_eaten_4.desc=Eat 40 pieces of food in one run
badges$badge.item_level_1.title=Novice Enchanter
badges$badge.item_level_1.desc=Acquire an item of level 3 or higher
badges$badge.item_level_2.title=Adept Enchanter
badges$badge.item_level_2.desc=Acquire an item of level 6 or higher
badges$badge.item_level_3.title=Expert Enchanter
badges$badge.item_level_3.desc=Acquire an item of level 9 or higher
badges$badge.item_level_4.title=Master Enchanter
badges$badge.item_level_4.desc=Acquire an item of level 12 or higher
badges$badge.victory.title=Victory!
badges$badge.victory.desc=Obtain the Amulet of Yendor
badges$badge.victory_all_classes.title=Master of Many Trades
badges$badge.victory_all_classes.desc=Obtain the Amulet of Yendor with the Warrior, Mage, Rogue & Huntress
badges$badge.mastery_combo.title=Gladiator's Fury
badges$badge.mastery_combo.desc=Reach a 10-hit combo
badges$badge.items_crafted_1.title=Novice Alchemist
badges$badge.items_crafted_1.desc=Craft 5 items via alchemy in one run
badges$badge.items_crafted_2.title=Adept Alchemist
badges$badge.items_crafted_2.desc=Craft 10 items via alchemy in one run
badges$badge.items_crafted_3.title=Expert Alchemist
badges$badge.items_crafted_3.desc=Craft 15 items via alchemy in one run
badges$badge.items_crafted_4.title=Master Alchemist
badges$badge.items_crafted_4.desc=Craft 20 items via alchemy in one run
badges$badge.no_monsters_slain.title=Pacifist
badges$badge.no_monsters_slain.desc=Complete a Floor without killing any monsters
badges$badge.grim_weapon.title=Grim Reaper
badges$badge.grim_weapon.desc=Monster killed by a Grim weapon
badges$badge.piranhas.title=Unconventional Angler
badges$badge.piranhas.desc=Kill 6 piranhas in one run
badges$badge.games_played_1.title=Novice Dungeoneer
badges$badge.games_played_1.desc=Play 10 games
badges$badge.games_played_2.title=Adept Dungeoneer
badges$badge.games_played_2.desc=Play 50 games
badges$badge.games_played_3.title=Expert Dungeoneer
badges$badge.games_played_3.desc=Play 250 games
badges$badge.games_played_4.title=Master Dungeoneer
badges$badge.games_played_4.desc=Play 1000 games
badges$badge.happy_end.title=Happy Ending
badges$badge.happy_end.desc=Take the Amulet of Yendor 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
badges$badge.champion_2.desc=Beat the game with 3 or more challenges enabled
badges$badge.champion_3.title=Golden Champion
badges$badge.champion_3.desc=Beat the game with 6 or more challenges enabled
badges$badge.unlock_mage.title=Mage Unlocked!
badges$badge.unlock_mage.desc=Unlock the Mage by using a scroll of upgrade
badges$badge.unlock_rogue.title=Rogue Unlocked!
badges$badge.unlock_rogue.desc=Unlock the Rogue by performing 10 surprise attacks in one run
badges$badge.unlock_huntress.title=Huntress Unlocked!
badges$badge.unlock_huntress.desc=Unlock the Huntress by attacking 10 enemies with thrown weapons in one run
challenges.no_food=On diet
challenges.no_food_desc=Food's already scarce, but you have to watch your portions as well!\n\n- Food and the horn of plenty are one third as effective at satisfying hunger\n- Other sources of satiety are unaffected

View File

@ -162,8 +162,12 @@ public class Badges {
this.meta = meta;
}
public String title(){
return Messages.get(this, name()+".title");
}
public String desc(){
return Messages.get(this, name());
return Messages.get(this, name()+".desc");
}
Badge() {
@ -853,7 +857,7 @@ public class Badges {
if (global.contains( badge )) {
if (!badge.meta) {
GLog.h( Messages.get(Badges.class, "endorsed", badge.desc()) );
GLog.h( Messages.get(Badges.class, "endorsed", badge.title()) );
}
} else {
@ -861,11 +865,7 @@ public class Badges {
global.add( badge );
saveNeeded = true;
if (badge.meta) {
GLog.h( Messages.get(Badges.class, "new_super", badge.desc()) );
} else {
GLog.h( Messages.get(Badges.class, "new", badge.desc()) );
}
GLog.h( Messages.get(Badges.class, "new", badge.title() + " (" + badge.desc() + ")") );
PixelScene.showBadge( badge );
}
}

View File

@ -154,7 +154,7 @@ public class BadgesGrid extends Component {
@Override
protected String hoverText() {
return badge.desc();
return badge.title();
}
}

View File

@ -92,7 +92,7 @@ public class BadgesList extends ScrollPane {
this.badge = badge;
icon.copy( BadgeBanner.image( badge.image ));
label.text( badge.desc() );
label.text( badge.title() );
}
@Override

View File

@ -42,20 +42,28 @@ public class WndBadge extends Window {
if (!unlocked) icon.brightness(0.4f);
add( icon );
RenderedTextBlock info = PixelScene.renderTextBlock( badge.desc(), 8 );
RenderedTextBlock title = PixelScene.renderTextBlock( badge.title(), 9 );
title.hardlight(TITLE_COLOR);
if (!unlocked) title.hardlight( 0x888822 );
add(title);
RenderedTextBlock info = PixelScene.renderTextBlock( badge.desc(), 6 );
info.maxWidth(WIDTH - MARGIN * 2);
info.align(RenderedTextBlock.CENTER_ALIGN);
PixelScene.align(info);
if (!unlocked) info.hardlight( 0x888888 );
add(info);
float w = Math.max( icon.width(), info.width() ) + MARGIN * 2;
float w = Math.max( icon.width(), Math.max(title.width(), info.width()) ) + MARGIN * 2;
icon.x = (w - icon.width()) / 2f;
icon.y = MARGIN;
PixelScene.align(icon);
info.setPos((w - info.width()) / 2, icon.y + icon.height() + MARGIN);
title.setPos((w - title.width()) / 2, icon.y + icon.height() + MARGIN);
PixelScene.align(title);
info.setPos((w - info.width()) / 2, title.bottom() + MARGIN);
PixelScene.align(info);
resize( (int)w, (int)(info.bottom() + MARGIN) );
if (unlocked) BadgeBanner.highlight( icon, badge.image );