diff options
author | Bardur Arantsson <bardur@scientician.net> | 2010-01-08 22:42:05 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2010-01-08 23:46:24 +0100 |
commit | 39d29b8f4fd6ad249246aa1a718493dfa2ec0bdf (patch) | |
tree | b79c14ac991a579fa6654928f4feb007dc97b99e | |
parent | f7eb880a91dc00f0531fe6a6ec795fe56ae5fc3f (diff) |
Import fix from CVS: Properly mark quest monsters as such.
-rw-r--r-- | changes.txt | 1 | ||||
-rw-r--r-- | lib/edit/between.map | 10 | ||||
-rw-r--r-- | lib/edit/evil.map | 6 | ||||
-rw-r--r-- | lib/edit/maeglin.map | 4 | ||||
-rw-r--r-- | lib/edit/nirnaeth.map | 16 | ||||
-rw-r--r-- | lib/edit/spiders.map | 4 | ||||
-rw-r--r-- | lib/edit/thieves.map | 10 | ||||
-rw-r--r-- | lib/edit/thrain.map | 4 | ||||
-rw-r--r-- | lib/edit/trolls.map | 10 | ||||
-rw-r--r-- | lib/edit/wights.map | 26 | ||||
-rw-r--r-- | src/init1.c | 20 | ||||
-rw-r--r-- | src/q_dragons.c | 5 | ||||
-rw-r--r-- | src/q_eol.c | 1 | ||||
-rw-r--r-- | src/q_evil.c | 5 | ||||
-rw-r--r-- | src/q_haunted.c | 8 | ||||
-rw-r--r-- | src/q_nazgul.c | 5 | ||||
-rw-r--r-- | src/q_one.c | 6 | ||||
-rw-r--r-- | src/q_poison.c | 1 | ||||
-rw-r--r-- | src/q_shroom.c | 11 | ||||
-rw-r--r-- | src/q_thrain.c | 9 | ||||
-rw-r--r-- | src/q_troll.c | 2 | ||||
-rw-r--r-- | src/q_wight.c | 2 | ||||
-rw-r--r-- | src/q_wolves.c | 10 |
23 files changed, 100 insertions, 76 deletions
diff --git a/changes.txt b/changes.txt index 5ea9a5ac..952d18d1 100644 --- a/changes.txt +++ b/changes.txt @@ -1,6 +1,7 @@ T.o.M.E 2.3.6 - Don't generate impassable glass walls. +- Mark *all* quest monsters properly. diff --git a/lib/edit/between.map b/lib/edit/between.map index 16fcf484..1458cdb7 100644 --- a/lib/edit/between.map +++ b/lib/edit/between.map @@ -23,16 +23,16 @@ F:G:89:5:955 F:L:89:5:956 # Floor with grass with a brown thunderlord -F:B:89:5:957 +F:B:89:5:957:0:0:0:0:0:0:2 # Floor with grass with a bronze thunderlord -F:z:89:5:958 +F:z:89:5:958:0:0:0:0:0:0:2 # Floor with dirt with a bronze thunderlord -F:Z:88:5:958 +F:Z:88:5:958:0:0:0:0:0:0:2 -# Floor with grass with a gold thunderlord -F:D:88:5:959 +# Floor with dirt with a gold thunderlord +F:D:88:5:959:0:0:0:0:0:0:2 D:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX D:X..T.TT..T...T...T...T.....T....T......T...T.,,.....T......T....T...T.T..T..TT...T..T.TT.T.TT.TX diff --git a/lib/edit/evil.map b/lib/edit/evil.map index d407c4ef..a2f00914 100644 --- a/lib/edit/evil.map +++ b/lib/edit/evil.map @@ -14,13 +14,13 @@ F:<:6:0 F:.:88:0 # Lesser Balrog -F:b:88:0:996 +F:b:88:0:996:0:0:0:0:0:0:2 # Greater Balrog -F:B:88:0:807 +F:B:88:0:807:0:0:0:0:0:0:2 # Pit Fiend -F:P:88:0:812 +F:P:88:0:812:0:0:0:0:0:0:2 # Dungeon layout D:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/lib/edit/maeglin.map b/lib/edit/maeglin.map index a230c68a..e3be9972 100644 --- a/lib/edit/maeglin.map +++ b/lib/edit/maeglin.map @@ -11,7 +11,7 @@ F:X:63:3 F:<:172:3 # up stairs with maeglin -F:{:6:3:825 +F:{:6:3:825:0:0:0:0:0:0:2 # Floor with dirt F:.:88:5 @@ -56,7 +56,7 @@ F:R:88:5:644 F:O:88:5:645 # Floor with dirt with a Lesser Balrog -F:U:88:5:996 +F:U:88:5:996:0:0:0:0:0:0:2 # Granite wall F:#:56:5 diff --git a/lib/edit/nirnaeth.map b/lib/edit/nirnaeth.map index 2ce0e886..a8c06999 100644 --- a/lib/edit/nirnaeth.map +++ b/lib/edit/nirnaeth.map @@ -14,28 +14,28 @@ F:s:88:5 F:V:84:5 # Dirt with Olog -F:a:88:5:538 +F:a:88:5:538:0:0:0:0:0:0:2 # Dirt with Cave Troll -F:b:88:5:496 +F:b:88:5:496:0:0:0:0:0:0:2 # Dirt with with Eldrak -F:c:88:1:620 +F:c:88:1:620:0:0:0:0:0:0:2 # Dirt with with Ettin -F:e:88:1:621 +F:e:88:1:621:0:0:0:0:0:0:2 # Dirt with with War troll -F:f:88:1:631 +F:f:88:1:631:0:0:0:0:0:0:2 # Dirt with with Hru -F:g:88:1:709 +F:g:88:1:709:0:0:0:0:0:0:2 # Dirt with Ulik the Troll -F:h:88:5:729 +F:h:88:5:729:0:0:0:0:0:0:2 # Dirt with Ancient green dragon -F:i:88:5:618 +F:i:88:5:618:0:0:0:0:0:0:2 # Dungeon D:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/lib/edit/spiders.map b/lib/edit/spiders.map index 95f20258..146c152c 100644 --- a/lib/edit/spiders.map +++ b/lib/edit/spiders.map @@ -20,10 +20,10 @@ F:b:89:3:275 F:c:89:3:277 # Grass with Aranea -F:d:89:3:963 +F:d:89:3:963:0:0:0:0:0:0:2 # Grass with Elder aranea -F:e:89:3:964 +F:e:89:3:964:0:0:0:0:0:0:2 # Dungeon layout D:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/lib/edit/thieves.map b/lib/edit/thieves.map index 9c42e130..9927089c 100644 --- a/lib/edit/thieves.map +++ b/lib/edit/thieves.map @@ -23,19 +23,19 @@ F:d:4:6 F:<:6:8 # Floor with Novice rogue -F:a:1:6:44 +F:a:1:6:44:0:0:0:0:0:0:2 # Floor with Bandit -F:b:1:6:150:43:* +F:b:1:6:150:43:*:0:0:0:0:2 # Floor with novice warrior -F:c:1:6:43 +F:c:1:6:43:0:0:0:0:0:0:2 # Floor with novice mage -F:e:1:6:46 +F:e:1:6:46:0:0:0:0:0:0:2 # Dark floor with novice warrior -F:f:1:4:43 +F:f:1:4:43:0:0:0:0:0:0:2 # Floor with human skeleton F:z:1:6:0:395 diff --git a/lib/edit/thrain.map b/lib/edit/thrain.map index 119d8763..8adc41be 100644 --- a/lib/edit/thrain.map +++ b/lib/edit/thrain.map @@ -2,8 +2,8 @@ F:.:1:0:0:0:0:0:0:0:61 # Some Nazguls -F:1:1:0:951:0:0:0:0:0:61 -F:2:1:0:952:0:0:0:0:0:61 +F:1:1:0:951:0:0:0:0:0:61:2 +F:2:1:0:952:0:0:0:0:0:61:2 F:o:1:0:866:0:0:0:0:0:61 # Marker diff --git a/lib/edit/trolls.map b/lib/edit/trolls.map index 14dc0efb..e5d104fd 100644 --- a/lib/edit/trolls.map +++ b/lib/edit/trolls.map @@ -17,19 +17,19 @@ F:.:88:3 F:;:89:3 # Floor with forest troll -F:f:89:3:297 +F:f:89:3:297:0:0:0:0:0:0:2 # Floor with stone troll -F:s:89:3:401 +F:s:89:3:401:0:0:0:0:0:0:2 # Floor with algroth -F:a:89:3:424 +F:a:89:3:424:0:0:0:0:0:0:2 # Floor with Bert -F:b:89:3:493 +F:b:89:3:493:0:0:0:0:0:0:2 # Floor with Bill -F:i:89:3:494 +F:i:89:3:494:0:0:0:0:0:0:2 # Floor with a Dwarven skeleton F:k:89:8:0:396 diff --git a/lib/edit/wights.map b/lib/edit/wights.map index de83b616..d35c20ee 100644 --- a/lib/edit/wights.map +++ b/lib/edit/wights.map @@ -17,13 +17,13 @@ F:;:88:3 F:f:88:3:381 # Floor with grave wight -F:g:88:3:470 +F:g:88:3:470:0:0:0:0:0:0:2 # Floor with barrow wight -F:b:88:3:499 +F:b:88:3:499:0:0:0:0:0:0:2 # Floor with Emperor Wight -F:e:88:3:604 +F:e:88:3:604:0:0:0:0:0:0:2 # Floor with a Human Skeleton F:k:88:8:0:395 @@ -64,17 +64,17 @@ D:X..k^^^^^^^^^^^^^^^^^^^^^^^XX D:Xfkff^^^^^...^^^^..ff^^^^^^XX D:X^f1^^^^^^.ffg^^^^.fgg^^^^^XX D:X^^^^^^^^^^^fg4^^^^f6^^^^^^XX -D:X^^^^^^^^^^^^f^^^^^^^^^fg8^XX -D:X^^^^^^.f^^^^^^^^^^^^.ffg^^XX -D:X^^^^.ff2^^^^^^.^^^^^^.f^^^XX -D:X^^^^^3.^^^^^^^.^^^^^^^^^^^XX -D:X^^^^^^^^^^^^ff.^^^^^^^^^^^XX -D:X^^^^^^^^^^^7gfg^^^^^^^^f^^XX +D:X^^^^^^^^^^^^f^^^^^^^^^gb8^XX +D:X^^^^^^.f^^^^^^^^^^^^.fgb^^XX +D:X^^^^.ff2^^^^^^.^^^^^^.g^^^XX +D:X^^^^^3.^^^^^^^f^^^^^^^^^^^XX +D:X^^^^^^^^^^^^bg.^^^^^^^^^^^XX +D:X^^^^^^^^^^^7bgf^^^^^^^^f^^XX D:X^^^^^^^^^^^^^^^^^^^..^..^^XX -D:X^^^^^^^^^^^^.^^^^^^....ff^XX -D:X^^^^...^^^^^ff^^^^^^..fg^^XX -D:X^^^.fff^^^^gfg^^^^...fgee^^X -D:X^^^^g5^^^^..8^^^^^f^fgfe,9^X +D:X^^^^^^^^^^^^.^^^^^^...ffg^XX +D:X^^^^...^^^^^ff^^^^^^.fgb^^XX +D:X^^^.fff^^^^bgb^^^^..fgbee^^X +D:X^^^^g5^^^^.g8^^^^^f^fgbe,9^X D:X^^^^^^^^^^^^^^^^^^^^^^^^^^^X D:XXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/init1.c b/src/init1.c index d7d90672..aff0301c 100644 --- a/src/init1.c +++ b/src/init1.c @@ -10956,6 +10956,7 @@ struct dungeon_grid int random; /* Number of the random effect */ int bx, by; /* For between gates */ int mimic; /* Mimiced features */ + s32b mflag; /* monster's mflag */ bool ok; bool defined; }; @@ -11007,12 +11008,12 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst return (0); } - /* Process "F:<letter>:<terrain>:<cave_info>:<monster>:<object>:<ego>:<artifact>:<trap>:<special>:<mimic>" -- info for dungeon grid */ + /* Process "F:<letter>:<terrain>:<cave_info>:<monster>:<object>:<ego>:<artifact>:<trap>:<special>:<mimic>:<mflag>" -- info for dungeon grid */ if (buf[0] == 'F') { int num; - if ((num = tokenize(buf + 2, 10, zz, ':', '/')) > 1) + if ((num = tokenize(buf + 2, 11, zz, ':', '/')) > 1) { int index = zz[0][0]; @@ -11027,6 +11028,7 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst letter[index].special = 0; letter[index].random = 0; letter[index].mimic = 0; + letter[index].mflag = 0; letter[index].ok = TRUE; letter[index].defined = TRUE; @@ -11170,6 +11172,11 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst letter[index].mimic = atoi(zz[9]); } + if (num > 10) + { + letter[index].mflag = atoi(zz[10]); + } + return (0); } } @@ -11205,7 +11212,7 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst /* Process "D:<dungeon>" -- info for the cave grids */ else if (buf[0] == 'D') { - int x; + int x, m_idx = 0; object_type object_type_body; @@ -11253,7 +11260,7 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst monster_level = quest[p_ptr->inside_quest].level + monster_index; - place_monster(y, x, meta_sleep, FALSE); + m_idx = place_monster(y, x, meta_sleep, FALSE); monster_level = level; } @@ -11261,10 +11268,13 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst { /* Place it */ m_allow_special[monster_index] = TRUE; - place_monster_aux(y, x, monster_index, meta_sleep, FALSE, MSTATUS_ENEMY); + m_idx = place_monster_aux(y, x, monster_index, meta_sleep, FALSE, MSTATUS_ENEMY); m_allow_special[monster_index] = FALSE; } + /* Set the mflag of the monster */ + if (m_idx) m_list[m_idx].mflag |= letter[idx].mflag; + /* Object (and possible trap) */ if ((random & RANDOM_OBJECT) && (random & RANDOM_TRAP)) { diff --git a/src/q_dragons.c b/src/q_dragons.c index a1501be8..e06dfbe7 100644 --- a/src/q_dragons.c +++ b/src/q_dragons.c @@ -53,7 +53,7 @@ bool quest_dragons_gen_hook(char *fmt) /* Place some random dragons */ for (i = 25; 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; @@ -79,7 +79,8 @@ bool quest_dragons_gen_hook(char *fmt) dragon = mature_dragons[color]; --i; - place_monster_one(y, x, dragon, 0, magik(33), MSTATUS_ENEMY); + m_idx = place_monster_one(y, x, dragon, 0, magik(33), MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; } } diff --git a/src/q_eol.c b/src/q_eol.c index ef46ef5d..4b66e8ad 100644 --- a/src/q_eol.c +++ b/src/q_eol.c @@ -64,6 +64,7 @@ bool quest_eol_gen_hook(char *fmt) m_allow_special[test_monster_name("Eol, the Dark Elf")] = TRUE; m_idx = place_monster_one(y, x, test_monster_name("Eol, the Dark Elf"), 0, FALSE, MSTATUS_ENEMY); m_allow_special[test_monster_name("Eol, the Dark Elf")] = FALSE; + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; } if (magik(18)) diff --git a/src/q_evil.c b/src/q_evil.c index 5e8259dc..1e5a19bb 100644 --- a/src/q_evil.c +++ b/src/q_evil.c @@ -37,13 +37,14 @@ bool quest_evil_gen_hook(char *fmt) /* Place some random balrogs */ for (i = 6; 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, 996, 0, FALSE, MSTATUS_ENEMY); + m_idx = place_monster_one(y, x, 996, 0, FALSE, MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; --i; } } diff --git a/src/q_haunted.c b/src/q_haunted.c index d27e62e3..9cd76d81 100644 --- a/src/q_haunted.c +++ b/src/q_haunted.c @@ -3,7 +3,7 @@ bool quest_haunted_gen_hook(char *fmt) { - int x, y, i; + int x, y, i, m_idx; int xstart = 2; int ystart = 2; @@ -43,7 +43,8 @@ bool quest_haunted_gen_hook(char *fmt) flags = f_info[cave[y][x].feat].flags1; if (!(flags & FF1_PERMANENT) && (flags & FF1_FLOOR)) { - place_monster_one(y, x, 477, 0, FALSE, MSTATUS_ENEMY); + m_idx = place_monster_one(y, x, 477, 0, FALSE, MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; --i; } } @@ -60,7 +61,8 @@ bool quest_haunted_gen_hook(char *fmt) int monsters[22] = { 65, 100, 124, 125, 133, 231, 273, 327, 365, 416, 418, 507, 508, 533, 534, 553, 554, 555, 577, 607, 622, 665}; int monster = monsters[rand_int(22)]; - place_monster_one(y, x, monster, 0, FALSE, MSTATUS_ENEMY); + m_idx = place_monster_one(y, x, monster, 0, FALSE, MSTATUS_ENEMY); + m_list[m_idx].mflag |= MFLAG_QUEST; --i; } } diff --git a/src/q_nazgul.c b/src/q_nazgul.c index 3114be13..ef188b16 100644 --- a/src/q_nazgul.c +++ b/src/q_nazgul.c @@ -3,7 +3,7 @@ bool quest_nazgul_gen_hook(char *fmt) { - int x = 1, y = 1, try = 10000; + int m_idx, x = 1, y = 1, try = 10000; s32b small; small = get_next_arg(fmt); @@ -27,7 +27,8 @@ bool quest_nazgul_gen_hook(char *fmt) /* Place the nazgul */ m_allow_special[test_monster_name("Uvatha the Horseman")] = TRUE; - place_monster_one(y, x, test_monster_name("Uvatha the Horseman"), 0, FALSE, MSTATUS_ENEMY); + m_idx = place_monster_one(y, x, test_monster_name("Uvatha the Horseman"), 0, FALSE, MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; m_allow_special[test_monster_name("Uvatha the Horseman")] = FALSE; return FALSE; diff --git a/src/q_one.c b/src/q_one.c index a472979a..c11c5233 100644 --- a/src/q_one.c +++ b/src/q_one.c @@ -338,7 +338,11 @@ bool quest_one_gen_hook(char *fmt) try--; } - if (try) place_monster_one(y, x, test_monster_name("Sauron, the Sorcerer"), 0, FALSE, MSTATUS_ENEMY); + if (try) + { + int m_idx = place_monster_one(y, x, test_monster_name("Sauron, the Sorcerer"), 0, FALSE, MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; + } return (FALSE); } diff --git a/src/q_poison.c b/src/q_poison.c index e3e1e69a..efc8712c 100644 --- a/src/q_poison.c +++ b/src/q_poison.c @@ -74,6 +74,7 @@ bool quest_poison_gen_hook(char *fmt) r_idx = get_mon_num(30); m_idx = place_monster_one(y, x, r_idx, 0, FALSE, MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; /* Sometimes make it up some levels */ if (magik(80) && m_idx) diff --git a/src/q_shroom.c b/src/q_shroom.c index 87d48cf4..c8cc3bec 100644 --- a/src/q_shroom.c +++ b/src/q_shroom.c @@ -5,7 +5,7 @@ bool quest_shroom_speak_hook(char *fmt); bool quest_shroom_town_gen_hook(char *fmt) { - int x = 1, y = 1, try = 10000; + int m_idx, x = 1, y = 1, try = 10000; s32b small; small = get_next_arg(fmt); @@ -34,19 +34,22 @@ bool quest_shroom_town_gen_hook(char *fmt) y = rand_range((cur_hgt / 2) - 5, (cur_hgt / 2) + 5); x = rand_range((cur_wid / 2) - 7, (cur_wid / 2) + 7); m_allow_special[test_monster_name("Grip, Farmer Maggot's dog")] = TRUE; - place_monster_one(y, x, test_monster_name("Grip, Farmer Maggot's dog"), 0, FALSE, MSTATUS_ENEMY); + m_idx = place_monster_one(y, x, test_monster_name("Grip, Farmer Maggot's dog"), 0, FALSE, MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; m_allow_special[test_monster_name("Grip, Farmer Maggot's dog")] = FALSE; y = rand_range((cur_hgt / 2) - 5, (cur_hgt / 2) + 5); x = rand_range((cur_wid / 2) - 7, (cur_wid / 2) + 7); m_allow_special[test_monster_name("Wolf, Farmer Maggot's dog")] = TRUE; - place_monster_one(y, x, test_monster_name("Wolf, Farmer Maggot's dog"), 0, FALSE, MSTATUS_ENEMY); + m_idx = place_monster_one(y, x, test_monster_name("Wolf, Farmer Maggot's dog"), 0, FALSE, MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; m_allow_special[test_monster_name("Wolf, Farmer Maggot's dog")] = FALSE; y = rand_range((cur_hgt / 2) - 5, (cur_hgt / 2) + 5); x = rand_range((cur_wid / 2) - 7, (cur_wid / 2) + 7); m_allow_special[test_monster_name("Fang, Farmer Maggot's dog")] = TRUE; - place_monster_one(y, x, test_monster_name("Fang, Farmer Maggot's dog"), 0, FALSE, MSTATUS_ENEMY); + m_idx = place_monster_one(y, x, test_monster_name("Fang, Farmer Maggot's dog"), 0, FALSE, MSTATUS_ENEMY); + if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; m_allow_special[test_monster_name("Fang, Farmer Maggot's dog")] = FALSE; msg_print("You hear frenzied barking."); diff --git a/src/q_thrain.c b/src/q_thrain.c index 5f5095d1..e7e3161a 100644 --- a/src/q_thrain.c +++ b/src/q_thrain.c @@ -157,16 +157,9 @@ bool quest_thrain_gen_hook(char *fmt) m_allow_special[test_monster_name("Thrain, the King Under the Mountain")] = TRUE; i = place_monster_one(y, x, test_monster_name("Thrain, the King Under the Mountain"), 0, FALSE, MSTATUS_NEUTRAL); + if (i) m_list[i].mflag |= MFLAG_QUEST; m_allow_special[test_monster_name("Thrain, the King Under the Mountain")] = FALSE; } - if (cave[y][x].m_idx) - { - m_ptr = &m_list[cave[y][x].m_idx]; - if ((m_ptr->r_idx == test_monster_name("Dwar, Dog Lord of Waw")) || (m_ptr->r_idx == test_monster_name("Hoarmurath of Dir"))) - { - m_ptr->mflag |= MFLAG_QUEST; - } - } } /* Don't try another one for this generation */ diff --git a/src/q_troll.c b/src/q_troll.c index b019b673..d1347ed6 100644 --- a/src/q_troll.c +++ b/src/q_troll.c @@ -48,6 +48,8 @@ bool quest_troll_gen_hook(char *fmt) /* Get local object */ object_type forge, *q_ptr = &forge; + m_list[m_idx].mflag |= MFLAG_QUEST; + a_allow_special[ART_GLAMDRING] = TRUE; /* Mega-Hack -- Prepare to make "Glamdring" */ diff --git a/src/q_wight.c b/src/q_wight.c index a49e3088..bf5b4868 100644 --- a/src/q_wight.c +++ b/src/q_wight.c @@ -48,6 +48,8 @@ bool quest_wight_gen_hook(char *fmt) /* Get local object */ object_type forge, *q_ptr = &forge; + m_list[m_idx].mflag |= MFLAG_QUEST; + /* Prepare to make the */ object_prep(q_ptr, lookup_kind(TV_SOFT_ARMOR, SV_FILTHY_RAG)); 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; } } |