summaryrefslogtreecommitdiff
path: root/src/q_wolves.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2010-01-08 22:42:05 +0100
committerBardur Arantsson <bardur@scientician.net>2010-01-08 23:46:24 +0100
commit39d29b8f4fd6ad249246aa1a718493dfa2ec0bdf (patch)
treeb79c14ac991a579fa6654928f4feb007dc97b99e /src/q_wolves.c
parentf7eb880a91dc00f0531fe6a6ec795fe56ae5fc3f (diff)
Import fix from CVS: Properly mark quest monsters as such.
Diffstat (limited to 'src/q_wolves.c')
-rw-r--r--src/q_wolves.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/q_wolves.c b/src/q_wolves.c
index 0b2825c7..39ef5794 100644
--- a/src/q_wolves.c
+++ b/src/q_wolves.c
@@ -37,13 +37,14 @@ bool quest_wolves_gen_hook(char *fmt)
/* Place some random wolves */
for (i = damroll(4, 4); i > 0; )
{
- int flags;
+ int m_idx, flags;
y = rand_int(21) + 3;
x = rand_int(31) + 3;
flags = f_info[cave[y][x].feat].flags1;
if (!(flags & FF1_PERMANENT) && (flags & FF1_FLOOR))
{
- place_monster_one(y, x, 196, 0, magik(50), MSTATUS_ENEMY);
+ m_idx = place_monster_one(y, x, 196, 0, magik(50), MSTATUS_ENEMY);
+ if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST;
--i;
}
}
@@ -51,13 +52,14 @@ bool quest_wolves_gen_hook(char *fmt)
/* Place some random wargs */
for (i = damroll(4, 4); i > 0; )
{
- int flags;
+ int m_idx, flags;
y = rand_int(21) + 3;
x = rand_int(31) + 3;
flags = f_info[cave[y][x].feat].flags1;
if (!(flags & FF1_PERMANENT) && (flags & FF1_FLOOR))
{
- place_monster_one(y, x, 257, 0, magik(50), MSTATUS_ENEMY);
+ m_idx = place_monster_one(y, x, 257, 0, magik(50), MSTATUS_ENEMY);
+ if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST;
--i;
}
}