"EXP_VAMP",
"DR_MANA",
"SUPERHURT",
+ "INERTIA",
+ "STUN",
NULL
};
"XXX",
};
-
/*
* Dungeon flags
*/
return (1);
}
+/*
+ * Grab one activation index flag
+ */
+static byte grab_one_activation_flag(cptr what)
+{
+ int i;
+ for (i = 0; ; i++)
+ {
+ if (activation_info[i].flag == NULL) break;
+
+ if (streq(what, activation_info[i].flag))
+ {
+ return activation_info[i].index;
+ }
+ }
+
+ i = atoi(what);
+ if (i > 0)
+ {
+ return ((byte) i);
+ }
+
+ /* Oops */
+#ifdef JP
+ msg_format("̤ÃΤÎȯư¡¦¥Õ¥é¥° '%s'¡£", what);
+#else
+ msg_format("Unknown activation flag '%s'.", what);
+#endif
+
+ /* Error */
+ return (0);
+}
/*
a_ptr->to_a = ta;
}
+ /* Hack -- Process 'U' for activation index */
+ else if (buf[0] == 'U')
+ {
+ byte n;
+ n = grab_one_activation_flag(buf + 2);
+ if (n > 0)
+ {
+ a_ptr->act_idx = n;
+ }
+ else
+ {
+ return (5);
+ }
+ }
+
/* Hack -- Process 'F' for flags */
else if (buf[0] == 'F')
{
{
if (p_ptr->inside_quest)
{
- artifact_type *a_ptr = &a_info[quest[p_ptr->inside_quest].k_idx];
- if (!(a_ptr->gen_flags & TRG_INSTA_ART))
+ int a_idx = quest[p_ptr->inside_quest].k_idx;
+ if (a_idx)
{
- letter[index].object = lookup_kind(a_ptr->tval, a_ptr->sval);
+ artifact_type *a_ptr = &a_info[a_idx];
+ if (!(a_ptr->gen_flags & TRG_INSTA_ART))
+ {
+ letter[index].object = lookup_kind(a_ptr->tval, a_ptr->sval);
+ }
}
}
}
return (0);
}
+ else if (zz[1][0] == 'R')
+ {
+ if (init_flags & INIT_ASSIGN)
+ {
+ int idx, count = 0;
+ int reward_idx = 0;
+
+ for (idx = 2; idx < num; idx++)
+ {
+ int a_idx = atoi(zz[idx]);
+ if (a_idx < 1) continue;
+ if (a_info[a_idx].cur_num > 0) continue;
+ count++;
+ if (one_in_(count)) reward_idx = a_idx;
+ }
+
+ if (reward_idx)
+ {
+ /* Set quest's rewarding artifact */
+ q_ptr->k_idx = reward_idx;
+ a_info[reward_idx].gen_flags |= TRG_QUESTITEM;
+ }
+ else
+ {
+ /* Change a quest type to KILL_ALL when all artifact of reward list are got */
+ q_ptr->type = QUEST_TYPE_KILL_ALL;
+ }
+ }
+
+ return (0);
+ }
+
/* Process "Q:<q_index>:N:<name>" -- quest name */
else if (zz[1][0] == 'N')
{
v = tmp;
}
+ /* Quest type */
+ else if (prefix(b+1, "QUEST_TYPE"))
+ {
+ /* "QUEST_TYPE" uses a special parameter to determine the type of the quest */
+ sprintf(tmp, "%d", quest[atoi(b+11)].type);
+ v = tmp;
+ }
+
/* Quest status */
else if (prefix(b+1, "QUEST"))
{