Q:5:N:Åã
# Definition
-Q:$5:Q:4:0:0:0:30:0:0:0:2
-Q:5:Q:4:0:0:0:30:0:0:0:2
+Q:$5:Q:8:0:0:0:40:0:0:0:10
+Q:5:Q:8:0:0:0:40:0:0:0:10
# Description for quest
-?:[LEQ $QUEST5 2]
+?:[LEQ $QUEST5 2]
+Q:$5:T:The tower outside the town was once used for defence of the city.
+Q:$5:T:Now many monsters seem to be dwelling there.
+Q:$5:T:Please clear it and return to us!
+Q:5:T:³¹¤Î³°¤Ë¤¢¤ëÅã¤Ï¤«¤Ä¤Æ³¹¤Î¼éÈ÷¤Ë»È¤ï¤ì¤Æ¤¤¤Þ¤·¤¿¡£
+Q:5:T:º£¤Ç¤Ï¤¿¤¯¤µ¤ó¤Î¥â¥ó¥¹¥¿¡¼¤¬½»¤ßÉÕ¤¤¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¡£
+Q:5:T:¤É¤¦¤«¥â¥ó¥¹¥¿¡¼¤É¤â¤ò°ìÁݤ·¤ÆÅã¤ò¼è¤êÌᤷ¤Æ¤¯¤À¤µ¤¤¡ª
+?:1
+
+?:[EQU $QUEST5 7]
Q:$5:T:The tower outside the town was once used for defence of the city.
Q:$5:T:Now many monsters seem to be dwelling there.
Q:$5:T:Please clear it and return to us!
Q:$5:T:Thank you for cleaning the tower of all these strange creatures.
Q:$5:T:I've talked with Astinus, the local librarian, Suiyan, the local
Q:$5:T:weaponmaster, and Lorien, the local beastmaster. They will offer you
-Q:$5:T:a special discount price when they serve you.
+Q:$5:T:a special discount price when they serve you. And a small reward
+Q:$5:T:awaits you outside.
Q:5:T:Åã¤Î²øʪ¤ò°ìÁݤ·¤Æ²¼¤µ¤Ã¤ÆÍÆñ¤¦¤´¤¶¤¤¤Þ¤¹¡£¤³¤Î³¹¤Î»Ê½ñ¤Î¥¢¥¹¥Æ¥£¥Ì¥¹¡¢
Q:5:T:Éð´ï¾¢¤Î¿å°Ã¡¢¥â¥ó¥¹¥¿¡¼Àç¿Í¤Î¥í¥ê¥¨¥ó¤ËÏäòÉÕ¤±¤Æ¤ª¤¤¤¿¤Î¤Ç¡¢
Q:5:T:º£¸å¤³¤ì¤é¤ÎŹ¤Ç¤Ï³Ê°Â¤Ç¥µ¡¼¥Ó¥¹¤ò¼õ¤±¤é¤ì¤ë¤Ç¤·¤ç¤¦¡£
+Q:5:T:²Ã¤¨¤Æ¡¢¤µ¤µ¤ä¤«¤Ê¤ªÎé¤ò³°¤ËÍÑ°Õ¤·¤Æ¤ª¤¤Þ¤·¤¿¡£
?:1
+# Description for quest failed
+?:[EQU $QUEST5 5]
+Q:$5:T:It seems like this task was too difficult for you. Good that I
+Q:$5:T:hired another adventurer to clean up the remaining monsters.
+Q:5:T:¤³¤Î»Å»ö¤Ï¤¢¤Ê¤¿¤Ë¤ÏÆñ¤·¤«¤Ã¤¿¤è¤¦¤Ç¤¹¤Í¡£Â¾¤ÎËÁ¸±¼Ô¤ò¸Û¤Ã¤Æ
+Q:5:T:»Ä¤ê¤Î¥â¥ó¥¹¥¿¡¼¤òÂ༣¤·¤Þ¤¹¤«¤é¡¢¤â¤¦¤¤¤¤¤Ç¤¹¤è¡£
+?:1
# Quest up to quest 6
F:<:QUEST_UP:8:0:0:0:0:NONE:6
F:>:QUEST_DOWN:8
# Monsters to keep the player busy ;-)
-F:1:FLOOR:8:*
-
-# If quests 6 and 7 are finished then you can complete quest 5
-?:[AND [EQU $QUEST6 4] [EQU $QUEST7 4] ]
-# Quest exit
-F:>:QUEST_EXIT:8
-# No monsters when you leave the tower
-F:1:FLOOR:8
-?:1
-
+F:1:FLOOR:8:*5
# Dungeon
D:XXXXXXXXXXX
-D:X>.1.....1X
+D:X>........X
D:XXXXXXXXX.X
-D:X1.....1X.X
+D:X.....1.X.X
D:X.XXXXX.X.X
-D:X.X<XXX.X.X
+D:X1X<XXX.X1X
D:X.X.....X.X
D:X.XXXXXXX.X
-D:X1.......1X
+D:X.....1...X
D:XXXXXXXXXXX
# Starting position when coming from town
?:[EQU $LEAVING_QUEST 0]
P:1:1
-# Starting position when coming from level 2 of the tower (quest 6)
-?:[EQU $LEAVING_QUEST 6]
-P:5:3
-
# Name
Q:$6:N:The Tower 2
-Q:6:N:Å㣲
+Q:6:N:\93\83
# Definition
-Q:$6:Q:6:0:0:0:30:0:0:0:3
-Q:6:Q:6:0:0:0:30:0:0:0:3
+Q:$6:Q:8:0:0:0:40:0:0:0:11
+Q:6:Q:8:0:0:0:40:0:0:0:11
# Floor with monster 9 levels out of deep as long as the quest is uncompleted
-F:1:FLOOR:8
-?:[EQU $QUEST6 1]
F:1:FLOOR:8:*9
-?:1
-# Quest down to quest 5
-F:>:QUEST_DOWN:8:0:0:0:0:NONE:5
+# Quest down to Town
+F:>:QUEST_DOWN:8
# Quest up to quest 7
F:<:QUEST_UP:8:0:0:0:0:NONE:7
# Dungeon
D:XXXXXXXXX
-D:X......1X
+D:X.1.....X
D:X.XXXXX.X
-D:X.X..1X.X
+D:X.X..1X1X
D:X.X.X.X.X
D:X.X>X.X.X
D:X.XXX.X.X
-D:X1....X<X
+D:X.1...X<X
D:XXXXXXXXX
# Starting position when coming from level 1 of the tower (quest 5)
?:[EQU $LEAVING_QUEST 5]
-P:5:3
-
-# Starting position when coming from level 3 of the tower (quest 7)
-?:[EQU $LEAVING_QUEST 7]
-P:7:7
-
+P:5:3
\ No newline at end of file
# Name
Q:$7:N:The Tower 3
-Q:7:N:Å㣳
+Q:7:N:\93\83
# Definition
-Q:$7:Q:6:0:0:0:30:0:0:0:3
-Q:7:Q:6:0:0:0:30:0:0:0:3
+Q:$7:Q:8:0:0:0:40:0:0:0:11
+Q:7:Q:8:0:0:0:40:0:0:0:11
# Floor with monster 11 levels out of deep as long as the quest is uncompleted
-F:@:FLOOR:8
-?:[EQU $QUEST7 1]
F:@:FLOOR:8:*11
-?:1
-# Quest stairs down to quest 6
-F:>:QUEST_DOWN:8:0:0:0:0:NONE:6
+# Quest stairs down to Town
+F:>:QUEST_DOWN:8
# Dungeon
D:XXXXXXXXX
F:b:BUILDING_1:3:0:0:0:0:NONE:5
# Quest 5 rewarding, continue with quest 26,
-# reward is cheaper *Identify* at the Library (see buildings)
+# reward is cheaper *Identify* at the Library (see buildings) and Ring of Poison Resistance
?:[EQU $QUEST5 3]
F:b:BUILDING_1:3:0:0:0:0:NONE:26
+F:!:FLOOR:3:0:143
-# Quest 5 finished, ontinue with quest 26
+# Quest 5 finished, continue with quest 26
?:[EQU $QUEST5 4]
F:b:BUILDING_1:3:0:0:0:0:NONE:26
#include "angband.h"
+bool confirm_leave_level(bool down_stair)
+{
+ quest_type *q_ptr = &quest[p_ptr->inside_quest];
+
+ /* Confirm leaving from once only quest */
+ if (confirm_quest && p_ptr->inside_quest &&
+ (q_ptr->type == QUEST_TYPE_RANDOM ||
+ (q_ptr->flags & QUEST_FLAG_ONCE &&
+ q_ptr->status != QUEST_STATUS_COMPLETED) ||
+ (q_ptr->flags & QUEST_FLAG_TOWER &&
+ ((q_ptr->status != QUEST_STATUS_STAGE_COMPLETED) ||
+ (down_stair && (quest[QUEST_TOWER1].status != QUEST_STATUS_COMPLETED))))))
+ {
+#ifdef JP
+ msg_print("¤³¤Î³¬¤ò°ìÅÙµî¤ë¤ÈÆóÅÙ¤ÈÌá¤Ã¤ÆÍè¤é¤ì¤Þ¤»¤ó¡£");
+ if (get_check("ËÜÅö¤Ë¤³¤Î³¬¤òµî¤ê¤Þ¤¹¤«¡©")) return TRUE;
+#else
+ msg_print("You can't come back here once you leave this floor.");
+ if (get_check("Really leave this floor? ")) return TRUE;
+#endif
+ }
+ else
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
/*
* Go up one level
/* Quest up stairs */
if (have_flag(f_ptr->flags, FF_QUEST))
{
+ /* Cancel the command */
+ if (!confirm_leave_level(FALSE)) return;
+
+
/* Success */
#ifdef JP
if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
}
else
{
- quest_type *q_ptr = &quest[p_ptr->inside_quest];
-
- /* Confirm leaving from once only quest */
- if (confirm_quest && p_ptr->inside_quest &&
- (q_ptr->type == QUEST_TYPE_RANDOM ||
- (q_ptr->flags & QUEST_FLAG_ONCE &&
- q_ptr->status != QUEST_STATUS_COMPLETED)))
- {
-#ifdef JP
- msg_print("¤³¤Î³¬¤ò°ìÅÙµî¤ë¤ÈÆóÅÙ¤ÈÌá¤Ã¤ÆÍè¤é¤ì¤Þ¤»¤ó¡£");
- if (get_check("ËÜÅö¤Ë¤³¤Î³¬¤òµî¤ê¤Þ¤¹¤«¡©")) go_up = TRUE;
-#else
- msg_print("You can't come back here once you leave this floor.");
- if (get_check("Really leave this floor? ")) go_up = TRUE;
-#endif
- }
- else
- {
- go_up = TRUE;
- }
+ go_up = confirm_leave_level(FALSE);
}
/* Cancel the command */
/* Quest down stairs */
else if (have_flag(f_ptr->flags, FF_QUEST))
{
+ /* Confirm Leaving */
+ if(!confirm_leave_level(TRUE)) return;
+
#ifdef JP
if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
msg_print("¤Ê¤ó¤À¤³¤Î³¬Ãʤϡª");
msg_print("You enter the down staircase.");
#endif
-
leave_quest_check();
+ leave_tower_check();
p_ptr->inside_quest = c_ptr->special;
for (i = 1; i < max_quests; i++)
{
- if ((quest[i].status == QUEST_STATUS_TAKEN) || (quest[i].status == QUEST_STATUS_COMPLETED))
+ if ((quest[i].status == QUEST_STATUS_TAKEN) ||
+ ((quest[i].status == QUEST_STATUS_STAGE_COMPLETED) && (quest[i].type == QUEST_TYPE_TOWER)) ||
+ (quest[i].status == QUEST_STATUS_COMPLETED))
{
/* Set the quest number temporary */
int old_quest = p_ptr->inside_quest;
{
char note[80] = "\0";
- if (quest[i].status == QUEST_STATUS_TAKEN)
+ if (quest[i].status == QUEST_STATUS_TAKEN || quest[i].status == QUEST_STATUS_STAGE_COMPLETED)
{
switch (quest[i].type)
{
break;
case QUEST_TYPE_KILL_ALL:
+ case QUEST_TYPE_TOWER:
#ifdef JP
sprintf(note," - Á´¤Æ¤Î¥â¥ó¥¹¥¿¡¼¤òÅݤ¹¡£");
#else
/* Check is the quest index is "fixed" */
#define is_fixed_quest_idx(Q_IDX) (((Q_IDX) < MIN_RANDOM_QUEST) || ((Q_IDX) > MAX_RANDOM_QUEST))
+#define QUEST_TOWER1 5
+#define QUEST_TOWER2 6
+#define QUEST_TOWER3 7
#define QUEST_OBERON 8
#define QUEST_SERPENT 9
/*
* Quest status
*/
-#define QUEST_STATUS_UNTAKEN 0
-#define QUEST_STATUS_TAKEN 1
-#define QUEST_STATUS_COMPLETED 2
-#define QUEST_STATUS_REWARDED 3
-#define QUEST_STATUS_FINISHED 4
-#define QUEST_STATUS_FAILED 5
-#define QUEST_STATUS_FAILED_DONE 6
+#define QUEST_STATUS_UNTAKEN 0
+#define QUEST_STATUS_TAKEN 1
+#define QUEST_STATUS_COMPLETED 2
+#define QUEST_STATUS_REWARDED 3
+#define QUEST_STATUS_FINISHED 4
+#define QUEST_STATUS_FAILED 5
+#define QUEST_STATUS_FAILED_DONE 6
+#define QUEST_STATUS_STAGE_COMPLETED 7
/*
* Quest type
#define QUEST_TYPE_KILL_NUMBER 5
#define QUEST_TYPE_KILL_ALL 6
#define QUEST_TYPE_RANDOM 7
+#define QUEST_TYPE_TOWER 8
/*
* Initialization flags
#define QUEST_FLAG_SILENT 0x01 /* no messages fro completion */
#define QUEST_FLAG_PRESET 0x02 /* quest is outside the main dungeon */
#define QUEST_FLAG_ONCE 0x04 /* quest is marked finished after leaving */
+#define QUEST_FLAG_TOWER 0x08 /* Tower quest is special */
/*
* Available graphic modes
{
quest[leaving_quest].status = QUEST_STATUS_FAILED;
quest[leaving_quest].complev = (byte)p_ptr->lev;
+ if(quest[leaving_quest].type == QUEST_TYPE_TOWER)
+ {
+ quest[QUEST_TOWER1].status = QUEST_STATUS_FAILED;
+ quest[QUEST_TOWER1].complev = (byte)p_ptr->lev;
+ }
if (quest[leaving_quest].type == QUEST_TYPE_RANDOM)
{
r_info[quest[leaving_quest].r_idx].flags1 &= ~(RF1_QUESTOR);
else if (record_fix_quest)
do_cmd_write_nikki(NIKKI_FIX_QUEST_F, leaving_quest, NULL);
}
+
+}
+
+void leave_tower_check(void)
+{
+ leaving_quest = p_ptr->inside_quest;
+ /* Check for Tower Quest */
+ if (leaving_quest &&
+ (quest[leaving_quest].type == QUEST_TYPE_TOWER) &&
+ (quest[QUEST_TOWER1].status != QUEST_STATUS_COMPLETED))
+ {
+ if(quest[leaving_quest].type == QUEST_TYPE_TOWER)
+ {
+ quest[QUEST_TOWER1].status = QUEST_STATUS_FAILED;
+ quest[QUEST_TOWER1].complev = (byte)p_ptr->lev;
+ }
+ }
}
dungeon_type = 0;
leave_quest_check();
+ leave_tower_check();
p_ptr->inside_quest = 0;
#endif
/* cmd2.c */
+extern bool confirm_leave_level(bool down_stair);
extern void do_cmd_go_up(void);
extern void do_cmd_go_down(void);
extern void do_cmd_search(void);
/* dungeon.c */
extern void leave_quest_check(void);
+extern void leave_tower_check(void);
extern void extract_option_vars(void);
extern void determine_bounty_uniques(void);
extern void determine_today_mon(bool conv_old);
/* Interesting quest */
if ((quest[i].type == QUEST_TYPE_KILL_NUMBER) ||
+ (quest[i].type == QUEST_TYPE_TOWER) ||
(quest[i].type == QUEST_TYPE_KILL_ALL))
break;
}
break;
}
+ case QUEST_TYPE_TOWER:
+ {
+ int number_mon = 0;
+
+ if (!is_hostile(m_ptr)) break;
+
+ /* Count all hostile monsters */
+ for (i2 = 0; i2 < cur_wid; ++i2)
+ for (j2 = 0; j2 < cur_hgt; j2++)
+ if (cave[j2][i2].m_idx > 0)
+ if (is_hostile(&m_list[cave[j2][i2].m_idx]))
+ number_mon++;
+
+ if ((number_mon - 1) == 0)
+ {
+ if (record_fix_quest) do_cmd_write_nikki(NIKKI_FIX_QUEST_C, i, NULL);
+
+ quest[i].status = QUEST_STATUS_STAGE_COMPLETED;
+ /* completed */
+ if((quest[QUEST_TOWER1].status == QUEST_STATUS_STAGE_COMPLETED) &&
+ (quest[QUEST_TOWER2].status == QUEST_STATUS_STAGE_COMPLETED) &&
+ (quest[QUEST_TOWER3].status == QUEST_STATUS_STAGE_COMPLETED))
+ {
+ quest[QUEST_TOWER1].status = QUEST_STATUS_COMPLETED;
+ quest[QUEST_TOWER1].complev = (byte)p_ptr->lev;;
+
+#ifdef JP
+msg_print("¥¯¥¨¥¹¥È¤òãÀ®¤·¤¿¡ª");
+#else
+ msg_print("You just completed your quest!");
+#endif
+ msg_print(NULL);
+ }
+ }
+ break;
+ }
}
}