v0.3.4: externalized all remaining actor strings

This commit is contained in:
Evan Debenham
2015-12-29 20:09:44 -05:00
committed by Evan Debenham
parent c3b964a8cc
commit 2c76c77360
53 changed files with 415 additions and 812 deletions
@@ -46,32 +46,8 @@ import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
public class Blacksmith extends NPC {
private static final String TXT_GOLD_1 =
"Hey human! Wanna be useful, eh? Take dis pickaxe and mine me some _dark gold ore_, _15 pieces_ should be enough. " +
"What do you mean, how am I gonna pay? You greedy...\n" +
"Ok, ok, I don't have money to pay, but I can do some smithin' for you. Consider yourself lucky, " +
"I'm the only blacksmith around.";
private static final String TXT_BLOOD_1 =
"Hey human! Wanna be useful, eh? Take dis pickaxe and _kill a bat_ wit' it, I need its blood on the head. " +
"What do you mean, how am I gonna pay? You greedy...\n" +
"Ok, ok, I don't have money to pay, but I can do some smithin' for you. Consider yourself lucky, " +
"I'm the only blacksmith around.";
private static final String TXT2 =
"Are you kiddin' me? Where is my pickaxe?!";
private static final String TXT3 =
"Dark gold ore. 15 pieces. Seriously, is it dat hard?";
private static final String TXT4 =
"I said I need bat blood on the pickaxe. Chop chop!";
private static final String TXT_COMPLETED =
"Oh, you have returned... Better late dan never.";
private static final String TXT_GET_LOST =
"I'm busy. Get lost!";
private static final String TXT_LOOKS_BETTER = "your %s certainly looks better now";
{
name = "troll blacksmith";
spriteClass = BlacksmithSprite.class;
}
@@ -89,7 +65,7 @@ public class Blacksmith extends NPC {
if (!Quest.given) {
GameScene.show( new WndQuest( this,
Quest.alternative ? TXT_BLOOD_1 : TXT_GOLD_1 ) {
Quest.alternative ? Messages.get(this, "blood_1") : Messages.get(this, "gold_1") ) {
@Override
public void onBackPressed() {
@@ -104,7 +80,7 @@ public class Blacksmith extends NPC {
} else {
Dungeon.level.drop( pick, Dungeon.hero.pos ).sprite.drop();
}
};
}
} );
Journal.add( Journal.Feature.TROLL );
@@ -114,15 +90,15 @@ public class Blacksmith extends NPC {
Pickaxe pick = Dungeon.hero.belongings.getItem( Pickaxe.class );
if (pick == null) {
tell( TXT2 );
tell( Messages.get(this, "lost_pick") );
} else if (!pick.bloodStained) {
tell( TXT4 );
tell( Messages.get(this, "blood_2") );
} else {
if (pick.isEquipped( Dungeon.hero )) {
pick.doUnequip( Dungeon.hero, false );
}
pick.detach( Dungeon.hero.belongings.backpack );
tell( TXT_COMPLETED );
tell( Messages.get(this, "completed") );
Quest.completed = true;
Quest.reforged = false;
@@ -133,16 +109,16 @@ public class Blacksmith extends NPC {
Pickaxe pick = Dungeon.hero.belongings.getItem( Pickaxe.class );
DarkGold gold = Dungeon.hero.belongings.getItem( DarkGold.class );
if (pick == null) {
tell( TXT2 );
tell( Messages.get(this, "lost_pick") );
} else if (gold == null || gold.quantity() < 15) {
tell( TXT3 );
tell( Messages.get(this, "gold_2") );
} else {
if (pick.isEquipped( Dungeon.hero )) {
pick.doUnequip( Dungeon.hero, false );
}
pick.detach( Dungeon.hero.belongings.backpack );
gold.detachAll( Dungeon.hero.belongings.backpack );
tell( TXT_COMPLETED );
tell( Messages.get(this, "completed") );
Quest.completed = true;
Quest.reforged = false;
@@ -155,7 +131,7 @@ public class Blacksmith extends NPC {
} else {
tell( TXT_GET_LOST );
tell( Messages.get(this, "get_lost") );
}
}
@@ -167,27 +143,27 @@ public class Blacksmith extends NPC {
public static String verify( Item item1, Item item2 ) {
if (item1 == item2) {
return "Select 2 different items, not the same item twice!";
return Messages.get(Blacksmith.class, "same_item");
}
if (item1.getClass() != item2.getClass()) {
return "Select 2 items of the same type!";
return Messages.get(Blacksmith.class, "diff_type");
}
if (!item1.isIdentified() || !item2.isIdentified()) {
return "I need to know what I'm working with, identify them first!";
return Messages.get(Blacksmith.class, "un_ided");
}
if (item1.cursed || item2.cursed) {
return "I don't work with cursed items!";
return Messages.get(Blacksmith.class, "cursed");
}
if (item1.level() < 0 || item2.level() < 0) {
return "It's a junk, the quality is too poor!";
return Messages.get(Blacksmith.class, "degraded");
}
if (!item1.isUpgradable() || !item2.isUpgradable()) {
return "I can't reforge these items!";
return Messages.get(Blacksmith.class, "cant_reforge");
}
return null;
@@ -212,7 +188,7 @@ public class Blacksmith extends NPC {
((EquipableItem)first).doUnequip( Dungeon.hero, true );
}
first.upgrade();
GLog.p( TXT_LOOKS_BETTER, first.name() );
GLog.p( ScrollOfUpgrade.TXT_LOOKS_BETTER, first.name() );
Dungeon.hero.spendAndNext( 2f );
Badges.validateItemLevelAquired( first );
@@ -243,13 +219,6 @@ public class Blacksmith extends NPC {
public boolean reset() {
return true;
}
@Override
public String description() {
return
"This troll blacksmith looks like all trolls look: he is tall and lean, and his skin resembles stone " +
"in both color and texture. The troll blacksmith is tinkering with unproportionally small tools.";
}
public static class Quest {
@@ -308,7 +277,7 @@ public class Blacksmith extends NPC {
public static boolean spawn( Collection<Room> rooms ) {
if (!spawned && Dungeon.depth > 11 && Random.Int( 15 - Dungeon.depth ) == 0) {
Room blacksmith = null;
Room blacksmith;
for (Room r : rooms) {
if (r.type == Type.STANDARD && r.width() > 4 && r.height() > 4) {
blacksmith = r;
@@ -39,10 +39,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.levels.SewerLevel;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndSadGhost;
import com.watabou.noosa.audio.Sample;
@@ -54,7 +54,6 @@ import java.util.HashSet;
public class Ghost extends NPC {
{
name = "sad ghost";
spriteClass = GhostSprite.class;
flying = true;
@@ -62,39 +61,6 @@ public class Ghost extends NPC {
state = WANDERING;
}
private static final String TXT_RAT1 =
"Hello %s... Once I was like you - strong and confident... " +
"But I was slain by a foul beast... I can't leave this place... Not until I have my revenge... " +
"Slay the _fetid rat_, that has taken my life...\n\n" +
"It stalks this floor... Spreading filth everywhere... " +
"_Beware its cloud of stink and corrosive bite, the acid dissolves in water..._ ";
private static final String TXT_RAT2 =
"Please... Help me... Slay the abomination...\n\n" +
"_Fight it near water... Avoid the stench..._";
private static final String TXT_GNOLL1 =
"Hello %s... Once I was like you - strong and confident... " +
"But I was slain by a devious foe... I can't leave this place... Not until I have my revenge... " +
"Slay the _gnoll trickster_, that has taken my life...\n\n" +
"It is not like the other gnolls... It hides and uses thrown weapons... " +
"_Beware its poisonous and incendiary darts, don't attack from a distance..._";
private static final String TXT_GNOLL2 =
"Please... Help me... Slay the trickster...\n\n" +
"_Don't let it hit you... Get near to it..._";
private static final String TXT_CRAB1 =
"Hello %s... Once I was like you - strong and confident... " +
"But I was slain by an ancient creature... I can't leave this place... Not until I have my revenge... " +
"Slay the _great crab_, that has taken my life...\n\n" +
"It is unnaturally old... With a massive single claw and a thick shell... " +
"_Beware its claw, you must surprise the crab or it will block with it..._";
private static final String TXT_CRAB2 =
"Please... Help me... Slay the Crustacean...\n\n" +
"_It will always block... When it sees you coming..._";
public Ghost() {
super();
@@ -106,11 +72,6 @@ public class Ghost extends NPC {
return 1000;
}
@Override
public String defenseVerb() {
return "evaded";
}
@Override
public float speed() {
return 0.5f;
@@ -148,13 +109,13 @@ public class Ghost extends NPC {
switch (Quest.type) {
case 1:
default:
GameScene.show(new WndQuest(this, TXT_RAT2));
GameScene.show(new WndQuest(this, Messages.get(this, "rat_2")));
break;
case 2:
GameScene.show(new WndQuest(this, TXT_GNOLL2));
GameScene.show(new WndQuest(this, Messages.get(this, "gnoll_2")));
break;
case 3:
GameScene.show(new WndQuest(this, TXT_CRAB2));
GameScene.show(new WndQuest(this, Messages.get(this, "crab_2")));
break;
}
@@ -181,13 +142,13 @@ public class Ghost extends NPC {
switch (Quest.type){
case 1: default:
questBoss = new FetidRat();
txt_quest = Utils.format(TXT_RAT1, Dungeon.hero.givenName()); break;
txt_quest = Messages.get(this, "rat_1", Dungeon.hero.givenName()); break;
case 2:
questBoss = new GnollTrickster();
txt_quest = Utils.format(TXT_GNOLL1, Dungeon.hero.givenName()); break;
txt_quest = Messages.get(this, "gnoll_1", Dungeon.hero.givenName()); break;
case 3:
questBoss = new GreatCrab();
txt_quest = Utils.format(TXT_CRAB1, Dungeon.hero.givenName()); break;
txt_quest = Messages.get(this, "crab_1", Dungeon.hero.givenName()); break;
}
questBoss.pos = Dungeon.level.randomRespawnCell();
@@ -201,15 +162,8 @@ public class Ghost extends NPC {
}
}
@Override
public String description() {
return
"The ghost is barely visible. It looks like a shapeless " +
"spot of faint light with a sorrowful face.";
}
private static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
private static final HashSet<Class<?>> IMMUNITIES = new HashSet<>();
static {
IMMUNITIES.add( Paralysis.class );
IMMUNITIES.add( Roots.class );
@@ -220,8 +174,6 @@ public class Ghost extends NPC {
return IMMUNITIES;
}
public static class Quest {
private static boolean spawned;
@@ -337,7 +289,7 @@ public class Ghost extends NPC {
public static void process() {
if (spawned && given && !processed && (depth == Dungeon.depth)) {
GLog.n("sad ghost: Thank you... come find me...");
GLog.n( Messages.get(Ghost.class, "find_me") );
for (Mob m : Dungeon.level.mobs){
if (m instanceof Ghost)
m.beckon(Dungeon.hero.pos);
@@ -22,7 +22,6 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Journal;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Golem;
@@ -32,10 +31,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.DwarfToken;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
import com.shatteredpixel.shatteredpixeldungeon.levels.CityLevel;
import com.shatteredpixel.shatteredpixeldungeon.levels.Room;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ImpSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndImp;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
import com.watabou.utils.Bundle;
@@ -44,36 +42,9 @@ import com.watabou.utils.Random;
public class Imp extends NPC {
{
name = "ambitious imp";
spriteClass = ImpSprite.class;
}
private static final String TXT_GOLEMS1 =
"Are you an adventurer? I love adventurers! You can always rely on them " +
"if something needs to be killed. Am I right? For a bounty of course ;)\n" +
"In my case this is _golems_ who need to be killed. You see, I'm going to start a " +
"little business here, but these stupid golems are bad for business! " +
"It's very hard to negotiate with wandering lumps of granite, damn them! " +
"So please, kill... let's say _6 of them_ and a reward is yours.";
private static final String TXT_MONKS1 =
"Are you an adventurer? I love adventurers! You can always rely on them " +
"if something needs to be killed. Am I right? For a bounty of course ;)\n" +
"In my case this is _monks_ who need to be killed. You see, I'm going to start a " +
"little business here, but these lunatics don't buy anything themselves and " +
"will scare away other customers. " +
"So please, kill... let's say _8 of them_ and a reward is yours.";
private static final String TXT_GOLEMS2 =
"How is your golem safari going?";
private static final String TXT_MONKS2 =
"Oh, you are still alive! I knew that your kung-fu is stronger ;) " +
"Just don't forget to grab these monks' tokens.";
private static final String TXT_CYA = "See you, %s!";
private static final String TXT_HEY = "Psst, %s!";
private boolean seenBefore = false;
@Override
@@ -81,7 +52,7 @@ public class Imp extends NPC {
if (!Quest.given && Dungeon.visible[pos]) {
if (!seenBefore) {
yell( Utils.format( TXT_HEY, Dungeon.hero.givenName() ) );
yell( Messages.get(this, "hey", Dungeon.hero.givenName() ) );
}
seenBefore = true;
} else {
@@ -98,11 +69,6 @@ public class Imp extends NPC {
return 1000;
}
@Override
public String defenseVerb() {
return "evaded";
}
@Override
public void damage( int dmg, Object src ) {
}
@@ -126,11 +92,13 @@ public class Imp extends NPC {
if (tokens != null && (tokens.quantity() >= 8 || (!Quest.alternative && tokens.quantity() >= 6))) {
GameScene.show( new WndImp( this, tokens ) );
} else {
tell( Quest.alternative ? TXT_MONKS2 : TXT_GOLEMS2, Dungeon.hero.givenName() );
tell( Quest.alternative ?
Messages.get(this, "monks_2", Dungeon.hero.givenName())
: Messages.get(this, "golems_2", Dungeon.hero.givenName()) );
}
} else {
tell( Quest.alternative ? TXT_MONKS1 : TXT_GOLEMS1 );
tell( Quest.alternative ? Messages.get(this, "monks_1") : Messages.get(this, "golems_1") );
Quest.given = true;
Quest.completed = false;
@@ -138,26 +106,19 @@ public class Imp extends NPC {
}
}
private void tell( String format, Object...args ) {
private void tell( String text ) {
GameScene.show(
new WndQuest( this, Utils.format( format, args ) ) );
new WndQuest( this, text ));
}
public void flee() {
yell( Utils.format( TXT_CYA, Dungeon.hero.givenName() ) );
yell( Messages.get(this, "cya", Dungeon.hero.givenName()) );
destroy();
sprite.die();
}
@Override
public String description() {
return
"Imps are lesser demons. They are notable for neither their strength nor their magic talent, " +
"but they are quite smart and sociable. Many imps prefer to live among non-demons.";
}
public static class Quest {
private static boolean alternative;
@@ -25,17 +25,12 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ImpSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
public class ImpShopkeeper extends Shopkeeper {
private static final String TXT_GREETINGS = "Hello, %s!";
public static final String TXT_THIEF = "I thought I could trust you!";
{
name = "ambitious imp";
spriteClass = ImpSprite.class;
}
@@ -45,7 +40,7 @@ public class ImpShopkeeper extends Shopkeeper {
protected boolean act() {
if (!seenBefore && Dungeon.visible[pos]) {
yell( Utils.format( TXT_GREETINGS, Dungeon.hero.givenName() ) );
yell( Messages.get(this, "greetings", Dungeon.hero.givenName() ) );
seenBefore = true;
}
@@ -66,11 +61,4 @@ public class ImpShopkeeper extends Shopkeeper {
sprite.emitter().burst( Speck.factory( Speck.WOOL ), 15 );
sprite.killAndErase();
}
@Override
public String description() {
return
"Imps are lesser demons. They are notable for neither their strength nor their magic talent. " +
"But they are quite smart and sociable, and many of imps prefer to live and do business among non-demons.";
}
}
@@ -37,11 +37,9 @@ import com.watabou.utils.Random;
public class MirrorImage extends NPC {
{
name = "mirror image";
spriteClass = MirrorSprite.class;
state = HUNTING;
}
public int tier;
@@ -98,7 +96,7 @@ public class MirrorImage extends NPC {
protected Char chooseEnemy() {
if (enemy == null || !enemy.isAlive()) {
HashSet<Mob> enemies = new HashSet<Mob>();
HashSet<Mob> enemies = new HashSet<>();
for (Mob mob:Dungeon.level.mobs) {
if (mob.hostile && Level.fieldOfView[mob.pos]) {
enemies.add( mob );
@@ -111,13 +109,6 @@ public class MirrorImage extends NPC {
return enemy;
}
@Override
public String description() {
return
"This illusion bears a close resemblance to you, " +
"but it's paler and twitches a little.";
}
@Override
public CharSprite sprite() {
CharSprite s = super.sprite();
@@ -140,7 +131,7 @@ public class MirrorImage extends NPC {
Dungeon.hero.busy();
}
private static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
private static final HashSet<Class<?>> IMMUNITIES = new HashSet<>();
static {
IMMUNITIES.add( ToxicGas.class );
IMMUNITIES.add( Burning.class );
@@ -24,12 +24,12 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.RatKingSprite;
public class RatKing extends NPC {
{
name = "rat king";
spriteClass = RatKingSprite.class;
state = SLEEPING;
@@ -68,19 +68,17 @@ public class RatKing extends NPC {
sprite.turnTo( pos, Dungeon.hero.pos );
if (state == SLEEPING) {
notice();
yell( "I'm not sleeping!" );
yell( Messages.get(this, "not_sleeping") );
state = WANDERING;
} else {
yell( "What is it? I have no time for this nonsense. My kingdom won't rule itself!" );
yell( Messages.get(this, "what_is_it") );
}
}
@Override
public String description() {
return ((RatKingSprite)sprite).festive ?
"This rat is a little bigger than a regular marsupial rat. " +
"It's wearing a tiny festive hat instead of its usual crown. Happy Holidays!"
: "This rat is a little bigger than a regular marsupial rat " +
"and it's wearing a tiny crown on its head.";
Messages.get(this, "desc_festive")
: super.description();
}
}
@@ -20,15 +20,15 @@
*/
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.SheepSprite;
import com.watabou.utils.Random;
public class Sheep extends NPC {
private static final String[] QUOTES = {"Baa!", "Baa?", "Baa.", "Baa..."};
private static final String[] LINE_KEYS = {"Baa!", "Baa?", "Baa.", "Baa..."};
{
name = "sheep";
spriteClass = SheepSprite.class;
}
@@ -55,15 +55,8 @@ public class Sheep extends NPC {
public void damage( int dmg, Object src ) {
}
@Override
public String description() {
return
"This is a magic sheep. What's so magical about it? You can't kill it. " +
"It will stand there until it magcially fades away, all the while chewing cud with a blank stare.";
}
@Override
public void interact() {
yell( Random.element( QUOTES ) );
yell( Messages.get(this, Random.element( LINE_KEYS )) );
}
}
@@ -34,11 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndTradeItem;
public class Shopkeeper extends NPC {
public static final String TXT_THIEF = "Thief, Thief!";
private int startPos = -1;
{
name = "shopkeeper";
spriteClass = ShopkeeperSprite.class;
properties.add(Property.IMMOVABLE);
@@ -83,13 +79,6 @@ public class Shopkeeper extends NPC {
return true;
}
@Override
public String description() {
return
"This stout guy looks more appropriate for a trade district in some large city " +
"than for a dungeon. His prices explain why he prefers to do business here.";
}
public static WndBag sell() {
return GameScene.selectItem( itemSelector, WndBag.Mode.FOR_SALE, "Select an item to sell" );
}
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CeremonialCandle;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.Embers;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Rotberry;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Journal;
@@ -48,60 +49,8 @@ import com.watabou.utils.Random;
public class Wandmaker extends NPC {
{
name = "old wandmaker";
spriteClass = WandmakerSprite.class;
}
private static final String INTRO_WARRIOR =
"Oh, what a pleasant surprise to meet a hero in such a depressing place! " +
"If you're up to helping an old man out, I may have a task for you.\n\n";
private static final String INTRO_ROGUE =
"Oh Goodness, you startled me! I haven't met a bandit from this place that still has his sanity, " +
"so you must be from the surface! If you're up to helping a stranger out, I may have a task for you.\n\n";
private static final String INTRO_MAGE =
"Oh, hello %s! I heard there was some ruckus regarding you and the wizards institute? " +
"Oh never mind, I never liked those stick-in-the-muds anyway. If you're willing, I may have a task for you.\n\n";
private static final String INTRO_HUNTRESS =
"Oh, hello miss! A friendly face is a pleasant surprise down here isn't it? " +
"In fact, I swear I've seen your face before, but I can't put my finger on it... " +
"Oh never mind, if you're here for adventure, I may have a task for you.\n\n";
private static final String INTRO_1 =
"I came here to find a rare ingredient for a wand, but I've gotten myself lost, " +
"and my magical shield is weakening. I'll need to leave soon, but can't bear to go without getting what I came for.";
private static final String INTRO_DUST =
"I'm looking for some _corpse dust_. It's a special kind of cursed bone meal that usually shows up in places like this. " +
"There should be a barricaded room around here somewhere, I'm sure some dust will turn up there. " +
"Do be careful though, the curse the dust carries is quite potent, _get back to me as fast as you can_ and I'll cleanse it for you.\n\n";
private static final String INTRO_EMBER =
"I'm looking for some _fresh embers_ from a newborn fire elemental. Elementals usually pop up when a summoning ritual isn't controlled, " +
"so just find some candles and a ritual site and I'm sure you can get one to pop up. " +
"You might want to _keep some sort of freezing item handy_ though, elementals are very powerful, but ice will take them down quite easily.\n\n";
private static final String INTRO_BERRY =
"The old warden of this prison kept a _rotberry plant_, and I'm after one of its seeds. The plant has probably gone wild by now though, " +
"so getting it to give up a seed might be tricky. Its garden should be somewhere around here. " +
"Try to _keep away from its vine lashers_ if you want to stay in one piece. Using fire might be tempting but please don't, you'll kill the plant and destroy its seeds.\n\n";
private static final String INTRO_2 =
"If you can get that for me, I'll be happy to pay you with one of my finely crafted wands! " +
"I brought two with me, so you can take whichever one you prefer.";
private static final String REMINDER_DUST =
"Any luck with corpse dust, %s? Look for some barricades.";
private static final String REMINDER_EMBER =
"Any luck with those embers, %s? You'll need to find four candles and the ritual site.";
private static final String REMINDER_BERRY =
"Any luck with a Rotberry seed, %s? Look for a room filled with vegetation.";
@Override
protected boolean act() {
@@ -114,11 +63,6 @@ public class Wandmaker extends NPC {
return 1000;
}
@Override
public String defenseVerb() {
return "absorbed";
}
@Override
public void damage( int dmg, Object src ) {
}
@@ -158,13 +102,13 @@ public class Wandmaker extends NPC {
String msg = "";
switch(Quest.type){
case 1:
msg = REMINDER_DUST;
msg = Messages.get(this, "reminder_dust", Dungeon.hero.givenName());
break;
case 2:
msg = REMINDER_EMBER;
msg = Messages.get(this, "reminder_ember", Dungeon.hero.givenName());
break;
case 3:
msg = REMINDER_BERRY;
msg = Messages.get(this, "reminder_berry", Dungeon.hero.givenName());
break;
}
GameScene.show(new WndQuest(this, Utils.format(msg, Dungeon.hero.givenName())));
@@ -176,42 +120,42 @@ public class Wandmaker extends NPC {
String msg2 = "";
switch(Dungeon.hero.heroClass){
case WARRIOR:
msg1 += INTRO_WARRIOR;
msg1 += Messages.get(this, "intro_warrior");
break;
case ROGUE:
msg1 += INTRO_ROGUE;
msg1 += Messages.get(this, "intro_rogue");
break;
case MAGE:
msg1 += INTRO_MAGE;
msg1 += Messages.get(this, "intro_mage", Dungeon.hero.givenName());
break;
case HUNTRESS:
msg1 += INTRO_HUNTRESS;
msg1 += Messages.get(this, "intro_huntress");
break;
}
msg1 += INTRO_1;
msg1 += Messages.get(this, "intro_1");
switch (Quest.type){
case 1:
msg2 += INTRO_DUST;
msg2 += Messages.get(this, "intro_dust");
break;
case 2:
msg2 += INTRO_EMBER;
msg2 += Messages.get(this, "intro_ember");
break;
case 3:
msg2 += INTRO_BERRY;
msg2 += Messages.get(this, "intro_berry");
break;
}
msg2 += INTRO_2;
msg2 += Messages.get(this, "intro_2");
final String msg2final = msg2;
final NPC wandmaker = this;
GameScene.show(new WndQuest(wandmaker, Utils.format(msg1, Dungeon.hero.givenName())){
GameScene.show(new WndQuest(wandmaker, msg1){
@Override
public void hide() {
super.hide();
GameScene.show(new WndQuest(wandmaker, Utils.format(msg2final, Dungeon.hero.givenName())));
GameScene.show(new WndQuest(wandmaker, msg2final));
}
});
@@ -220,13 +164,6 @@ public class Wandmaker extends NPC {
}
}
@Override
public String description() {
return
"This old yet hale gentleman wears a slightly confused " +
"expression. He is protected by a magic shield.";
}
public static class Quest {
private static int type;