}
case CLASS_PALADIN:
+ case CLASS_SNIPER:
{
/* Bad sensing */
if (0 != randint0(77777L / (plev * plev + 40))) return;
case CLASS_SAMURAI:
case CLASS_CAVALRY:
case CLASS_BERSERKER:
+ case CLASS_SNIPER:
{
return;
}
{
quest[leaving_quest].status = QUEST_STATUS_FAILED;
quest[leaving_quest].complev = (byte)p_ptr->lev;
- if (quest[leaving_quest].type == QUEST_TYPE_RANDOM)
+
+ /* Additional settings */
+ switch (quest[leaving_quest].type)
{
+ case QUEST_TYPE_TOWER:
+ quest[QUEST_TOWER1].status = QUEST_STATUS_FAILED;
+ quest[QUEST_TOWER1].complev = (byte)p_ptr->lev;
+ break;
+ case QUEST_TYPE_FIND_ARTIFACT:
+ a_info[quest[leaving_quest].k_idx].gen_flags &= ~(TRG_QUESTITEM);
+ break;
+ case QUEST_TYPE_RANDOM:
r_info[quest[leaving_quest].r_idx].flags1 &= ~(RF1_QUESTOR);
- if (record_rand_quest)
- do_cmd_write_nikki(NIKKI_RAND_QUEST_F, leaving_quest, NULL);
/* Floor of random quest will be blocked */
prepare_change_floor_mode(CFM_NO_RETURN);
+ break;
+ }
+
+ /* Record finishing a quest */
+ if (quest[leaving_quest].type == QUEST_TYPE_RANDOM)
+ {
+ if (record_rand_quest) do_cmd_write_nikki(NIKKI_RAND_QUEST_F, leaving_quest, NULL);
+ }
+ 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;
}
- else if (record_fix_quest)
- do_cmd_write_nikki(NIKKI_FIX_QUEST_F, leaving_quest, NULL);
}
}
/* "Inscribe" it */
o_ptr->feeling = feel;
+ /* Player touches it */
+ o_ptr->marked |= OM_TOUCHED;
+
/* Combine / Reorder the pack (later) */
p_ptr->notice |= (PN_COMBINE | PN_REORDER);
#endif
(void)set_shero(10 + randint1(p_ptr->lev), FALSE);
+ (void)set_afraid(0);
}
if ((p_ptr->muta2 & MUT2_COWARDICE) && (randint1(3000) == 13))
msg_print(NULL);
set_food(PY_FOOD_WEAK);
if (music_singing_any()) stop_singing();
+ if (hex_spelling_any()) stop_hex_spell_all();
}
if ((p_ptr->muta2 & MUT2_WALK_SHAD) &&
dungeon_type = 0;
leave_quest_check();
+ leave_tower_check();
p_ptr->inside_quest = 0;
if (!o_ptr->k_idx) continue;
/* Skip known objects */
- if (object_is_known(o_ptr)) continue;
+ if (object_is_known(o_ptr))
+ {
+ /* Touched? */
+ if (o_ptr->marked & OM_TOUCHED) continue;
+ }
/* Skip pseudo-known objects */
if (o_ptr->ident & IDENT_SENSE) continue;
now_message = 0;
+ /* Sniper */
+ if ((p_ptr->pclass == CLASS_SNIPER) && (p_ptr->concent))
+ reset_concent = TRUE;
+
/* Parse the command */
switch (command_cmd)
{
do_cmd_kaji(TRUE);
else if (p_ptr->pclass == CLASS_MAGIC_EATER)
do_cmd_magic_eater(TRUE);
+ else if (p_ptr->pclass == CLASS_SNIPER)
+ do_cmd_snipe_browse();
else do_cmd_browse();
break;
}
do_cmd_cast_learned();
else if (p_ptr->pclass == CLASS_SMITH)
do_cmd_kaji(FALSE);
+ else if (p_ptr->pclass == CLASS_SNIPER)
+ do_cmd_snipe();
else
do_cmd_cast();
}
break;
}
+ /* Record/stop "Movie" */
+ case ']':
+ {
+ prepare_movie_hooks();
+ break;
+ }
+
/* Make random artifact list */
case KTRL('V'):
{
break;
}
+#ifdef TRAVEL
+ case '`':
+ {
+ if (!p_ptr->wild_mode) do_cmd_travel();
+ if (p_ptr->special_defense & KATA_MUSOU)
+ {
+ set_action(ACTION_NONE);
+ }
+ break;
+ }
+#endif
+
/* Hack -- Unknown command */
default:
{
{
if (inventory[INVEN_PACK].k_idx)
{
- int item = INVEN_PACK;
char o_name[MAX_NLEN];
object_type *o_ptr;
+ /* Is auto-destroy done? */
+ notice_stuff();
+ if (!inventory[INVEN_PACK].k_idx) return;
+
/* Access the slot to be dropped */
- o_ptr = &inventory[item];
+ o_ptr = &inventory[INVEN_PACK];
/* Disturbing */
disturb(0, 0);
/* Message */
#ifdef JP
- msg_format("%s(%c)¤òÍî¤È¤·¤¿¡£", o_name, index_to_label(item));
+ msg_format("%s(%c)¤òÍî¤È¤·¤¿¡£", o_name, index_to_label(INVEN_PACK));
#else
- msg_format("You drop %s (%c).", o_name, index_to_label(item));
+ msg_format("You drop %s (%c).", o_name, index_to_label(INVEN_PACK));
#endif
/* Drop it (carefully) near the player */
(void)drop_near(o_ptr, 0, py, px);
/* Modify, Describe, Optimize */
- inven_item_increase(item, -255);
- inven_item_describe(item);
- inven_item_optimize(item);
+ inven_item_increase(INVEN_PACK, -255);
+ inven_item_describe(INVEN_PACK);
+ inven_item_optimize(INVEN_PACK);
/* Handle "p_ptr->notice" */
notice_stuff();
/* Handle the player song */
if (!load) check_music();
+ /* Hex - Handle the hex spells */
+ if (!load) check_hex();
+ if (!load) revenge_spell();
+
load = FALSE;
/* Fast */
run_step(0);
}
+#ifdef TRAVEL
+ /* Traveling */
+ else if (travel.run)
+ {
+ /* Take a step */
+ travel_step();
+ }
+#endif
+
/* Repeated command */
else if (command_rep)
{
break;
}
+ /* Sniper */
+ if (energy_use && reset_concent) reset_concentration(TRUE);
+
/* Handle "leaving" */
if (p_ptr->leaving) break;
}
}
#endif
+ if (browsing_movie)
+ {
+ reset_visuals();
+ browse_movie();
+ return;
+ }
+
hack_mutation = FALSE;
/* Hack -- Character is "icky" */
quit(0);
}
+ creating_savefile = new_game;
+
/* Nothing loaded */
if (!character_loaded)
{
}
}
+ creating_savefile = FALSE;
+
p_ptr->teleport_town = FALSE;
p_ptr->sutemi = FALSE;
world_monster = FALSE;