v2.2.0: added a bunch of structuring for the blacksmith quest
This commit is contained in:
@@ -951,12 +951,31 @@ actors.hero.talent.ratforcements.desc=_+1:_ Using ratmogrify on yourself _spawns
|
||||
|
||||
###npcs
|
||||
actors.mobs.npcs.blacksmith.name=troll blacksmith
|
||||
actors.mobs.npcs.blacksmith.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...\nOk, 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.
|
||||
actors.mobs.npcs.blacksmith.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...\nOk, 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.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_warrior=Hey Human! You look like a tough one.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_mage=Hey Human! You look like a smart one.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_rogue=Hey Human! You look like a sneaky one.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_huntress=Hey Human! You look like a quick one.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_duelist=Hey Human! You look like a brave one.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_cleric=Hey Human! You look like an important one.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_start=Wanna be useful, eh? Yeah I got something you could do. I built dis workshop ontop of an old mine, it's just down dat ladder. Take dis pickaxe and mine me some _dark gold ore. 40 pieces_ should be enough.\n\nWhat do you mean, how am I gonna pay? You greedy...\n\nOk, ok, I can do some smithin' for you. Consider yourself lucky, I'm the only blacksmith around.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_crystal=Careful though, the mine's dangerous for a little human like you. It's been abandoned for a while, and bunch of crystals have started growing. They're shiny, but too fragile to be worth anythin', and they've got some magic things protecting 'em. They're pretty strong, so _be careful where you mine_ or you'll get their attention.\n\nThere's a _giant crystal_ somewhere too. It's a lot tougher, so be prepared for a fight if you start breakin' it. I'll bet smashing it will slow all other crystals down though, so I'll pay extra if you can do it.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_fungi=Careful though, the mine's dangerous for a little human like you. There's some sorta fungus monster that's been growing down there. It's got mushroom sentries that're really deadly if they see you, but they can't get up and chase you at least. _Keep out of sight_ if you want to stay alive.\n\nI'll pay extra if you can manage to take down the _biggest mushrom,_ but it'll take some real effort. It's connected to a bunch of mycelium nodes that're hidden in the walls. You'll have to break most of 'em before you can really damage it.
|
||||
actors.mobs.npcs.blacksmith.intro_quest_gnoll=Careful though, the mine's dangerous for a little human like you. Some gnolls want the gold too and now they're wreckin' the place. They're stupid things, so their mining has caused all sorts of collapses and cave-ins. You'll have to mine though it, so _look for recently disturbed rock._\n\nI think one of the gnolls is causing most of the trouble, probably a _geomancer shaman_ or somethin'. I'll pay extra, if you can find and kill it, but I'm sure it'll fight back.
|
||||
actors.mobs.npcs.blacksmith.reminder=You done wastin' my time? The mine entrance is over there.
|
||||
actors.mobs.npcs.blacksmith.lost_pick=Are you kiddin' me? Where is my pickaxe?!
|
||||
actors.mobs.npcs.blacksmith.gold_2=Dark gold ore. 15 pieces. Seriously, is it dat hard?
|
||||
actors.mobs.npcs.blacksmith.blood_2=I said I need bat blood on the pickaxe. Chop chop!
|
||||
actors.mobs.npcs.blacksmith.completed=Oh, you have returned... Better late dan never.
|
||||
actors.mobs.npcs.blacksmith.quest_start_prompt=You ready to go down? Make sure you've got some free space for the gold.\n\n_I'm only lettin' you down der once!_
|
||||
actors.mobs.npcs.blacksmith.enter_yes=I'm Ready
|
||||
actors.mobs.npcs.blacksmith.enter_no=Not Yet
|
||||
actors.mobs.npcs.blacksmith.exit_warn_none=You done already? You've hardly got any gold at all!\n\n_Remember, I'm not lettin' you back in once you come up._
|
||||
actors.mobs.npcs.blacksmith.exit_warn_low=You done already? Doesn't look like you've got a lot of gold.\n\n_Remember, I'm not lettin' you back in once you come up._
|
||||
actors.mobs.npcs.blacksmith.exit_warn_med=You done? You've got some gold at least, but there's definitely more in the mine.\n\n_Remember, I'm not lettin' you back in once you come up._
|
||||
actors.mobs.npcs.blacksmith.exit_warn_high=You done? Looks like you've got a good amount of gold, but I could use a bit more.\n\n_Remember, I'm not lettin' you back in once you come up._
|
||||
actors.mobs.npcs.blacksmith.exit_warn_full=You done? You've got lots of gold, but make sure you haven't left any of your gear behind.\n\n_Remember, I'm not lettin' you back in once you come up._
|
||||
actors.mobs.npcs.blacksmith.exit_warn_crystal=That giant crystal's still down there too. I'll pay extra if you destroy it.
|
||||
actors.mobs.npcs.blacksmith.exit_warn_fungi=That giant mushroom's still down there too. I'll pay extra if you kill it.
|
||||
actors.mobs.npcs.blacksmith.exit_warn_gnoll=That gnoll geomancer's still down there too. I'll pay extra if you kill it.
|
||||
actors.mobs.npcs.blacksmith.exit_yes=I'm Done
|
||||
actors.mobs.npcs.blacksmith.exit_no=Not Yet
|
||||
actors.mobs.npcs.blacksmith.get_lost=I'm busy. Get lost!
|
||||
actors.mobs.npcs.blacksmith.same_item=Select 2 different items, not the same item twice!
|
||||
actors.mobs.npcs.blacksmith.diff_type=Select 2 items of the same type!
|
||||
@@ -964,17 +983,17 @@ actors.mobs.npcs.blacksmith.un_ided=I need to know what I'm working with, identi
|
||||
actors.mobs.npcs.blacksmith.cursed=I don't work with cursed items!
|
||||
actors.mobs.npcs.blacksmith.degraded=It's junk, the quality is too poor!
|
||||
actors.mobs.npcs.blacksmith.cant_reforge=I can't reforge these items!
|
||||
actors.mobs.npcs.blacksmith.intro_quest_1=QUEST_1_INTRO
|
||||
actors.mobs.npcs.blacksmith.intro_quest_2=QUEST_2_INTRO
|
||||
actors.mobs.npcs.blacksmith.intro_quest_3=QUEST_3_INTRO
|
||||
actors.mobs.npcs.blacksmith.reminder=REMINDER
|
||||
actors.mobs.npcs.blacksmith.entrance_blocked=The way down is blocked.
|
||||
actors.mobs.npcs.blacksmith.cant_enter_old=That area is not accessible on this run. Play a new game to try the new quest!
|
||||
actors.mobs.npcs.blacksmith.exit_warn=I'm not lettin' you back in, so if you're comin' out, make sure you're all done!
|
||||
actors.mobs.npcs.blacksmith.exit_yes=I'm Done
|
||||
actors.mobs.npcs.blacksmith.exit_no=Not Yet
|
||||
actors.mobs.npcs.blacksmith.def_verb=blocked
|
||||
actors.mobs.npcs.blacksmith.desc=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.
|
||||
actors.mobs.npcs.blacksmith.desc=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 disproportionally small tools.
|
||||
|
||||
##old blacksmith quest dialogue from pre-v2.2.0
|
||||
actors.mobs.npcs.blacksmith.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...\nOk, 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.
|
||||
actors.mobs.npcs.blacksmith.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...\nOk, 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.
|
||||
actors.mobs.npcs.blacksmith.gold_2=Dark gold ore. 15 pieces. Seriously, is it dat hard?
|
||||
actors.mobs.npcs.blacksmith.blood_2=I said I need bat blood on the pickaxe. Chop chop!
|
||||
actors.mobs.npcs.blacksmith.completed=Oh, you have returned... Better late dan never.
|
||||
|
||||
actors.mobs.npcs.ghost.name=sad ghost
|
||||
actors.mobs.npcs.ghost.rat_1=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\nIt stalks this floor... Spreading filth everywhere... _Beware its cloud of stink and corrosive bite, the acid dissolves in water..._
|
||||
|
||||
@@ -163,6 +163,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndHero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndResurrect;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndTitledMessage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndTradeItem;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
@@ -1313,25 +1314,77 @@ public class Hero extends Char {
|
||||
|
||||
} else if (transition.type == LevelTransition.Type.BRANCH_EXIT
|
||||
&& Dungeon.depth >= 11 && Dungeon.depth <= 14
|
||||
&& (!Blacksmith.Quest.given() || Blacksmith.Quest.oldQuestMineBlocked() || Blacksmith.Quest.completed())) {
|
||||
&& (!Blacksmith.Quest.given() || Blacksmith.Quest.oldQuestMineBlocked() || Blacksmith.Quest.completed() || !Blacksmith.Quest.started())) {
|
||||
|
||||
if (Blacksmith.Quest.oldQuestMineBlocked()){
|
||||
GLog.w(Messages.get(Blacksmith.class, "cant_enter_old"));
|
||||
} else {
|
||||
} else if (!Blacksmith.Quest.given() || Blacksmith.Quest.completed()) {
|
||||
GLog.w(Messages.get(Blacksmith.class, "entrance_blocked"));
|
||||
} else if (!Blacksmith.Quest.started() && Blacksmith.Quest.Type() != 0){
|
||||
final Pickaxe pick = belongings.getItem(Pickaxe.class);
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
if (pick == null){
|
||||
GameScene.show( new WndTitledMessage(new BlacksmithSprite(),
|
||||
Messages.titleCase(Messages.get(Blacksmith.class, "name")),
|
||||
Messages.get(Blacksmith.class, "lost_pick"))
|
||||
);
|
||||
} else {
|
||||
GameScene.show( new WndOptions( new BlacksmithSprite(),
|
||||
Messages.titleCase(Messages.get(Blacksmith.class, "name")),
|
||||
Messages.get(Blacksmith.class, "quest_start_prompt"),
|
||||
Messages.get(Blacksmith.class, "enter_yes"),
|
||||
Messages.get(Blacksmith.class, "enter_no")){
|
||||
@Override
|
||||
protected void onSelect(int index) {
|
||||
if (index == 0){
|
||||
Blacksmith.Quest.start();
|
||||
actTransition(action);
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
ready();
|
||||
|
||||
} else if (transition.type == LevelTransition.Type.BRANCH_ENTRANCE
|
||||
&& Dungeon.depth >= 11 && Dungeon.depth <= 14
|
||||
&& !Blacksmith.Quest.completed()) {
|
||||
&& !Blacksmith.Quest.completed() && Blacksmith.Quest.Type() != 0) {
|
||||
|
||||
String warnText;
|
||||
DarkGold gold = belongings.getItem(DarkGold.class);
|
||||
int goldAmount = gold == null ? 0 : gold.quantity();
|
||||
if (goldAmount < 10){
|
||||
warnText = Messages.get(Blacksmith.class, "exit_warn_none");
|
||||
} else if (goldAmount < 20){
|
||||
warnText = Messages.get(Blacksmith.class, "exit_warn_low");
|
||||
} else if (goldAmount < 30){
|
||||
warnText = Messages.get(Blacksmith.class, "exit_warn_med");
|
||||
} else if (goldAmount < 40){
|
||||
warnText = Messages.get(Blacksmith.class, "exit_warn_high");
|
||||
} else {
|
||||
warnText = Messages.get(Blacksmith.class, "exit_warn_full");
|
||||
}
|
||||
|
||||
if (!Blacksmith.Quest.bossBeaten()){
|
||||
switch (Blacksmith.Quest.Type()){
|
||||
case 1: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_crystal"); break;
|
||||
case 2: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_fungi"); break;
|
||||
case 3: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_gnoll"); break;
|
||||
}
|
||||
}
|
||||
|
||||
String finalWarnText = warnText;
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
GameScene.show( new WndOptions( new BlacksmithSprite(),
|
||||
Messages.titleCase(Messages.get(Blacksmith.class, "name")),
|
||||
Messages.get(Blacksmith.class, "exit_warn"),
|
||||
finalWarnText,
|
||||
Messages.get(Blacksmith.class, "exit_yes"),
|
||||
Messages.get(Blacksmith.class, "exit_no")){
|
||||
@Override
|
||||
|
||||
@@ -86,36 +86,46 @@ public class Blacksmith extends NPC {
|
||||
|
||||
if (!Quest.given) {
|
||||
|
||||
final String text;
|
||||
//pre-v2.2.0 saves
|
||||
switch (Quest.type ){
|
||||
case 0: default:
|
||||
text = Quest.alternative ? Messages.get(Blacksmith.this, "blood_1") : Messages.get(Blacksmith.this, "gold_1");
|
||||
break;
|
||||
case 1:
|
||||
text = Messages.get(Blacksmith.this, "intro_quest_1");
|
||||
break;
|
||||
case 2:
|
||||
text = Messages.get(Blacksmith.this, "intro_quest_2");
|
||||
break;
|
||||
case 3:
|
||||
text = Messages.get(Blacksmith.this, "intro_quest_3");
|
||||
break;
|
||||
String msg1 = "";
|
||||
String msg2 = "";
|
||||
|
||||
if (Quest.type == 0){
|
||||
//pre-v2.2.0 saves
|
||||
msg1 = Quest.alternative ? Messages.get(Blacksmith.this, "blood_1") : Messages.get(Blacksmith.this, "gold_1");
|
||||
} else {
|
||||
|
||||
switch (Dungeon.hero.heroClass){
|
||||
case WARRIOR: msg1 += Messages.get(Blacksmith.this, "intro_quest_warrior"); break;
|
||||
case MAGE: msg1 += Messages.get(Blacksmith.this, "intro_quest_mage"); break;
|
||||
case ROGUE: msg1 += Messages.get(Blacksmith.this, "intro_quest_rogue"); break;
|
||||
case HUNTRESS: msg1 += Messages.get(Blacksmith.this, "intro_quest_huntress"); break;
|
||||
case DUELIST: msg1 += Messages.get(Blacksmith.this, "intro_quest_duelist"); break;
|
||||
//case CLERIC: msg1 += Messages.get(Blacksmith.this, "intro_quest_cleric"); break;
|
||||
}
|
||||
|
||||
msg1 += "\n\n" + Messages.get(Blacksmith.this, "intro_quest_start");
|
||||
|
||||
switch (Quest.type){
|
||||
case 1: msg2 += Messages.get(Blacksmith.this, "intro_quest_crystal"); break;
|
||||
case 2: msg2 += Messages.get(Blacksmith.this, "intro_quest_fungi"); break;
|
||||
case 3: msg2 += Messages.get(Blacksmith.this, "intro_quest_gnoll"); break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
final String msg1Final = msg1;
|
||||
final String msg2Final = msg2;
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
GameScene.show(new WndQuest(Blacksmith.this, text) {
|
||||
|
||||
GameScene.show(new WndQuest(Blacksmith.this, msg1Final) {
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
|
||||
public void hide() {
|
||||
super.hide();
|
||||
|
||||
Quest.given = true;
|
||||
Quest.completed = false;
|
||||
Notes.add( Notes.Landmark.TROLL );
|
||||
|
||||
Pickaxe pick = new Pickaxe();
|
||||
pick.identify();
|
||||
if (pick.doPickUp( Dungeon.hero )) {
|
||||
@@ -123,6 +133,11 @@ public class Blacksmith extends NPC {
|
||||
} else {
|
||||
Dungeon.level.drop( pick, Dungeon.hero.pos ).sprite.drop();
|
||||
}
|
||||
|
||||
if (msg2Final != ""){
|
||||
GameScene.show(new WndQuest(Blacksmith.this, msg2Final));
|
||||
}
|
||||
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -309,13 +324,15 @@ public class Blacksmith extends NPC {
|
||||
public static class Quest {
|
||||
|
||||
// 0 = old blacksmith quest (pre-2.2.0)
|
||||
// 1 = TBA
|
||||
// 2 = TBA
|
||||
// 3 = TBA
|
||||
// 1 = Crystal
|
||||
// 2 = Fungi
|
||||
// 3 = Gnoll
|
||||
private static int type;
|
||||
|
||||
private static boolean spawned;
|
||||
private static boolean given;
|
||||
private static boolean started;
|
||||
private static boolean bossBeaten;
|
||||
private static boolean completed;
|
||||
|
||||
private static int favor;
|
||||
@@ -329,6 +346,8 @@ public class Blacksmith extends NPC {
|
||||
|
||||
spawned = false;
|
||||
given = false;
|
||||
started = false;
|
||||
bossBeaten = false;
|
||||
favor = 0;
|
||||
|
||||
completed = false;
|
||||
@@ -340,6 +359,8 @@ public class Blacksmith extends NPC {
|
||||
private static final String TYPE = "type";
|
||||
private static final String SPAWNED = "spawned";
|
||||
private static final String GIVEN = "given";
|
||||
private static final String STARTED = "started";
|
||||
private static final String BOSS_BEATEN = "boss_beaten";
|
||||
private static final String COMPLETED = "completed";
|
||||
|
||||
private static final String FAVOR = "favor";
|
||||
@@ -356,6 +377,8 @@ public class Blacksmith extends NPC {
|
||||
if (spawned) {
|
||||
node.put( TYPE, type );
|
||||
node.put( GIVEN, given );
|
||||
node.put( STARTED, started );
|
||||
node.put( BOSS_BEATEN, bossBeaten );
|
||||
node.put( COMPLETED, completed );
|
||||
node.put( FAVOR, favor );
|
||||
node.put( ALTERNATIVE, alternative );
|
||||
@@ -372,6 +395,8 @@ public class Blacksmith extends NPC {
|
||||
if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) {
|
||||
type = node.getInt(TYPE);
|
||||
given = node.getBoolean( GIVEN );
|
||||
started = node.getBoolean( STARTED );
|
||||
bossBeaten = node.getBoolean( BOSS_BEATEN );
|
||||
completed = node.getBoolean( COMPLETED );
|
||||
favor = node.getInt( FAVOR );
|
||||
alternative = node.getBoolean( ALTERNATIVE );
|
||||
@@ -395,11 +420,26 @@ public class Blacksmith extends NPC {
|
||||
}
|
||||
return rooms;
|
||||
}
|
||||
public static int Type(){
|
||||
return type;
|
||||
}
|
||||
|
||||
public static boolean given(){
|
||||
return given;
|
||||
}
|
||||
|
||||
public static boolean started(){
|
||||
return started;
|
||||
}
|
||||
|
||||
public static void start(){
|
||||
started = true;
|
||||
}
|
||||
|
||||
public static boolean bossBeaten(){
|
||||
return bossBeaten;
|
||||
}
|
||||
|
||||
public static boolean completed(){
|
||||
return given && completed;
|
||||
}
|
||||
@@ -412,7 +452,15 @@ public class Blacksmith extends NPC {
|
||||
DarkGold gold = Dungeon.hero.belongings.getItem(DarkGold.class);
|
||||
if (gold != null){
|
||||
favor += Math.min(2000, gold.quantity()*50);
|
||||
gold.detachAll(Dungeon.hero.belongings.backpack);
|
||||
}
|
||||
|
||||
//we may want to store this so that any upgrades are remembered.
|
||||
Pickaxe pick = Dungeon.hero.belongings.getItem(Pickaxe.class);
|
||||
if (pick.isEquipped(Dungeon.hero)) {
|
||||
pick.doUnequip(Dungeon.hero, false);
|
||||
}
|
||||
pick.detach(Dungeon.hero.belongings.backpack);
|
||||
//check for boss enemy, add another 1k points if they are dead
|
||||
//perhaps reduce final quest score if hero is hit by avoidable boss attacks?
|
||||
Statistics.questScores[2] = favor;
|
||||
|
||||
Reference in New Issue
Block a user