From ae6c83ec9f0273d13ad57f1382528d7715189a2b Mon Sep 17 00:00:00 2001 From: zelgadis Date: Wed, 19 Sep 2007 08:55:18 +0000 Subject: This change moves the logic for when a level or branch prohibits teleport control from the C++ code into the vault .des files. This is done with the additions of two things: * Changeable, persistent per-level and per-branch flags which affect game play. * Dungeon events for the killing of monsters, picking up of objects and changing of features. The current level and branch flags are for teleport control prevention, making a level unmappable (like the Abyss or a Labyrinth), and preventing magic mapping from working (like the Abyss or a Labyrinth). Some related changes: * The new .des header KMASK allows for dungeon grid masks like no_monster_gen to be applied to specific symbols rather than the entire vault. * If the wizard mapping command (&{) is used in a place which is unmappable, it will ask if you wish to force the area to be mappable (so you can see what an entire Labyrinth or Abyss level looks like without having to hack the source). * A new wizard-mode level-map command, 'T', will teleport the player to wherever the cursor is pointing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2146 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/dat/clua/lm_flags.lua | 347 +++++++++++++++++++++++++++++++++ crawl-ref/source/dat/clua/luamark.lua | 1 + crawl-ref/source/dat/elf.des | 85 +++++++- crawl-ref/source/dat/hells.des | 20 ++ crawl-ref/source/dat/lair.des | 7 +- crawl-ref/source/dat/vaults.des | 5 + crawl-ref/source/dat/zot.des | 5 + 7 files changed, 459 insertions(+), 11 deletions(-) create mode 100644 crawl-ref/source/dat/clua/lm_flags.lua (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/clua/lm_flags.lua b/crawl-ref/source/dat/clua/lm_flags.lua new file mode 100644 index 0000000000..770c80110e --- /dev/null +++ b/crawl-ref/source/dat/clua/lm_flags.lua @@ -0,0 +1,347 @@ +--------------------------------------------------------------------------- +-- lm_flags.lua +-- Changing level flags and branch flags +-------------------------------------------------------------------------- + +-------------------------------------------------------------------------- +-- There are three different types of pre-packaged "change level and +-- branch flags" marker types. All three share the following parameters: +-- +-- * level_flags: A space separated list of level flag names to set or unset. +-- To unset a flag, prefix the name with "!". +-- +-- * branch_flags: Like level_flags, but for branch flags to set or unset. +-- +-- * group: Different flag change markers on the same level can be put +-- into the same group by giving them the same group name. +-- Of all of the markers in the same group, only the last one +-- to have its conditions met will cause the flags to change. +-- This is useful if, for example, there are two magical fountains, +-- and you only want the flags to change when both dry up. +-- +-- * msg: A message to give the user when the flags are changed; suppress +-- any messages Crawl would normally give for the changes effected. +-- The message is not given if nothing is changed (i.e., if all +-- the flags to be set were already set and all the flags to be +-- unset were already unset). +-- +-- The three different marker types can be created with the following +-- functions: +-- +-- * mons_dies_change_flags(): Creates a marker which changes the flags +-- when a named monster dies. Accepts the parameter "mon_name" +-- as the name of the monster to watch. The marker can be +-- placed anywhere on the level, and doesn't have to be near the +-- monster when it dies. +-- +-- * feat_change_change_flags(): Creates a marker which acts when the +-- feature of its grid changes. Accepts the optional string +-- parameter "final_feat", which will cause the change to only +-- take place when the changed feature contains final_feat as +-- a substring. For example, a sparkling fountain can dry up +-- either by turning directly into a dry_fountain_ii feature, +-- or by first turning into a blue_fountain feature, and then +-- into a dry_fountain_i feature. Without final_feat, the +-- flags will change if the sparkling fountain changes into +-- a blue fountain. However, if "final_feat" is set to +-- "dry_fountain", the marker will ignore the feature turning +-- into blue_fountain, and will only act when it changes into +-- dry_fountain_i or dry_fountain_ii +-- +-- * item_pickup_change_flags(): Creates a marker which acts when +-- an item on its grid gets picked up. Accepts the parameter +-- "item", which is the plain name of the item its watching +-- (i.e., "Orb of Zot" and "golden rune" rather than "the Orb of Zot" +-- or "a golden rune"). +-------------------------------------------------------------------------- + +ChangeFlags = { } +ChangeFlags.__index = ChangeFlags + +function ChangeFlags:_new() + local cf = { } + setmetatable(cf, self) + self.__index = self + + return cf +end + +function ChangeFlags:new(pars) + pars = pars or { } + + pars.level_flags = pars.level_flags or "" + pars.branch_flags = pars.branch_flags or "" + pars.msg = pars.msg or "" + + if not (pars.level_flags ~= "" or pars.branch_flags ~= "") then + error("Must provide at least one of level_flags or branch_flags.") + end + + local cf = self:_new() + cf.level_flags = pars.level_flags + cf.branch_flags = pars.branch_flags + cf.msg = pars.msg + cf.props = { flag_group = pars.group } + + return cf +end + +function ChangeFlags:do_change(marker) + local did_change1 = false + local did_change2 = false + local silent = self.msg and self.msg ~= "" + + if self.props.flag_group and self.props.flag_group ~= "" then + local num_markers = dgn.num_matching_markers("flag_group", + self.props.group) + + if num_markers > 1 then + return false, false + end + end + + if self.level_flags and self.level_flags ~= "" then + did_change1 = dgn.change_level_flags(self.level_flags, silent) + end + + if self.branch_flags and self.branch_flags ~= "" then + did_change2 = dgn.change_branch_flags(self.branch_flags, silent) + end + + if did_change1 or did_change2 then + if self.msg and self.msg ~= "" then + crawl.mpr(self.smg) + end + + return true, true + end + + return true, false +end + +function ChangeFlags:property(marker, pname) + return self.props[pname] or '' +end + +function ChangeFlags:write(marker, th) + file.marshall(th, self.level_flags) + file.marshall(th, self.branch_flags) + file.marshall(th, self.msg) + lmark.marshall_table(th, self.props) +end + +function ChangeFlags:read(marker, th) + self.level_flags = file.unmarshall_string(th) + self.branch_flags = file.unmarshall_string(th) + self.msg = file.unmarshall_string(th) + self.props = lmark.unmarshall_table(th) + setmetatable(self, ChangeFlags) + + return self +end + +-------------------------------------------------------------------------- +-------------------------------------------------------------------------- + +MonDiesChangeFlags = ChangeFlags:_new() +MonDiesChangeFlags.__index = MonDiesChangeFlags + +function MonDiesChangeFlags:_new(pars) + local mdcf + + if pars then + mdcf = ChangeFlags:new(pars) + else + mdcf = ChangeFlags:_new() + end + + setmetatable(mdcf, self) + self.__index = self + + return mdcf +end + +function MonDiesChangeFlags:new(pars) + pars = pars or { } + + if not pars.mon_name then + error("No monster name provided.") + end + + local mdcf = self:_new(pars) + mdcf.mon_name = pars.mon_name + + return mdcf +end + +function MonDiesChangeFlags:activate(marker) + dgn.register_listener(dgn.dgn_event_type('monster_dies'), marker) +end + +function MonDiesChangeFlags:event(marker, ev) + local midx = ev:arg1() + local mons = dgn.mons_from_index(midx) + + if not mons then + error("MonDiesChangeFlags:event() didn't get a valid monster index") + end + + if mons.name == self.mon_name then + ChangeFlags.do_change(self, marker) + dgn.remove_listener(marker) + dgn.remove_marker(marker) + end +end + +function MonDiesChangeFlags:write(marker, th) + ChangeFlags.write(self, marker, th) + file.marshall(th, self.mon_name) +end + +function MonDiesChangeFlags:read(marker, th) + ChangeFlags.read(self, marker, th) + self.mon_name = file.unmarshall_string(th) + setmetatable(self, MonDiesChangeFlags) + + return self +end + +function mons_dies_change_flags(pars) + return MonDiesChangeFlags:new(pars) +end + +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- +FeatChangeChangeFlags = ChangeFlags:_new() +FeatChangeChangeFlags.__index = FeatChangeChangeFlags + +function FeatChangeChangeFlags:_new(pars) + local fccf + + if pars then + fccf = ChangeFlags:new(pars) + else + fccf = ChangeFlags:_new() + end + + setmetatable(fccf, self) + self.__index = self + + return fccf +end + +function FeatChangeChangeFlags:new(pars) + pars = pars or { } + + local fccf = self:_new(pars) + + fccf.final_feat = pars.final_feat + + return fccf +end + +function FeatChangeChangeFlags:activate(marker) + dgn.register_listener(dgn.dgn_event_type('feat_change'), marker, + marker:pos()) +end + +function FeatChangeChangeFlags:event(marker, ev) + if self.final_feat and self.final_feat ~= "" then + local feat = dgn.feature_name(dgn.grid(ev:pos())) + if not string.find(feat, self.final_feat) then + return + end + end + + ChangeFlags.do_change(self, marker) + dgn.remove_listener(marker, marker:pos()) + dgn.remove_marker(marker) +end + +function FeatChangeChangeFlags:write(marker, th) + ChangeFlags.write(self, marker, th) + file.marshall(th, self.final_feat) +end + +function FeatChangeChangeFlags:read(marker, th) + ChangeFlags.read(self, marker, th) + self.final_feat = file.unmarshall_string(th) + setmetatable(self, FeatChangeChangeFlags) + + return self +end + +function feat_change_change_flags(pars) + return FeatChangeChangeFlags:new(pars) +end + +-------------------------------------------------------------------------- +-------------------------------------------------------------------------- + +ItemPickupChangeFlags = ChangeFlags:_new() +ItemPickupChangeFlags.__index = ItemPickupChangeFlags + +function ItemPickupChangeFlags:_new(pars) + local ipcf + + if pars then + ipcf = ChangeFlags:new(pars) + else + ipcf = ChangeFlags:_new() + end + + setmetatable(ipcf, self) + self.__index = self + + return ipcf +end + +function ItemPickupChangeFlags:new(pars) + pars = pars or { } + + if not pars.item then + error("No item name provided.") + end + + local ipcf = self:_new(pars) + ipcf.item = pars.item + + return ipcf +end + +function ItemPickupChangeFlags:activate(marker) + dgn.register_listener(dgn.dgn_event_type('item_pickup'), marker, + marker:pos()) +end + +function ItemPickupChangeFlags:event(marker, ev) + local obj_idx = ev:arg1() + local it = dgn.item_from_index(obj_idx) + + if not it then + error("ItemPickupChangeFlags:event() didn't get a valid item index") + end + + if item.name(it) == self.item then + ChangeFlags.do_change(self, marker) + dgn.remove_listener(marker, marker:pos()) + dgn.remove_marker(marker) + end +end + +function ItemPickupChangeFlags:write(marker, th) + ChangeFlags.write(self, marker, th) + file.marshall(th, self.item) +end + +function ItemPickupChangeFlags:read(marker, th) + ChangeFlags.read(self, marker, th) + self.item = file.unmarshall_string(th) + setmetatable(self, ItemPickupChangeFlags) + + return self +end + +function item_pickup_change_flags(pars) + return ItemPickupChangeFlags:new(pars) +end diff --git a/crawl-ref/source/dat/clua/luamark.lua b/crawl-ref/source/dat/clua/luamark.lua index 58eeda6c68..0c29327ab5 100644 --- a/crawl-ref/source/dat/clua/luamark.lua +++ b/crawl-ref/source/dat/clua/luamark.lua @@ -6,6 +6,7 @@ dofile('clua/lm_pdesc.lua') dofile('clua/lm_1way.lua') dofile('clua/lm_timed.lua') +dofile('clua/lm_flags.lua') function dlua_marker_function(table, name) return table[name] diff --git a/crawl-ref/source/dat/elf.des b/crawl-ref/source/dat/elf.des index b1d692f674..5bd1eb2824 100644 --- a/crawl-ref/source/dat/elf.des +++ b/crawl-ref/source/dat/elf.des @@ -97,6 +97,7 @@ NAME: elf_hall PLACE: Elf:7 ORIENT: northwest FLAGS: no_rotate +LFLAGS: no_tele_control MONS: deep elf high priest, deep elf demonologist, deep elf annihilator MONS: deep elf sorcerer, deep elf death mage MONS: deep elf blademaster, deep elf master archer @@ -110,6 +111,10 @@ SUBST: v : xvb SUBST: | = | *:2 SUBST: $ = $:20 *:4 |:1 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -157,6 +162,7 @@ NAME: elf_hall_gauntlet_wide PLACE: Elf:7 TAGS: no_pool_fixup FLAGS: no_rotate +LFLAGS: no_tele_control ORIENT: float CHANCE: 5 MONS: deep elf high priest, deep elf demonologist @@ -173,6 +179,10 @@ KMONS: A = deep elf master archer KFEAT: A = | KMONS: B = deep elf blademaster KFEAT: B = | +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP cccccccccccccccccccccccccc c2ccccccc........ccccccccc @@ -204,6 +214,7 @@ ENDMAP NAME: elf_hall_gauntlet_narrow PLACE: Elf:7 FLAGS: no_rotate +LFLAGS: no_tele_control TAGS: no_pool_fixup ORIENT: float CHANCE: 5 @@ -226,6 +237,10 @@ SUBST: | = | *:2 SUBST: * = * |:3 KITEM: 6 = | KITEM: 7 = | +#MARKER: U = lua:feat_change_change_flags { \ +# level_flags="!no_tele_control", final_feat="dry_fountain", \ +# group="fountain" \ +# } MAP ccccccccccccccccccccccccc c2ccccccc.......ccccccccc @@ -260,7 +275,8 @@ NAME: elf_hall_rogue_1 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -272,6 +288,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$ce**|||**eccccccce%*%%%*%ec$$ccccxc @@ -305,7 +325,8 @@ NAME: elf_hall_rogue_2 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -317,6 +338,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$ce%*%%%%%ecccccc=e**|||**ec$$ccccxc @@ -350,7 +375,8 @@ NAME: elf_hall_rogue_3 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -362,6 +388,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$ce%%%%%*%eccccccce**|||**ec$$=cccxc @@ -395,7 +425,8 @@ NAME: elf_hall_rogue_4 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -407,6 +438,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$ce%*%%%%%eccccccce**|||**ec$$ccccxc @@ -440,7 +475,8 @@ NAME: elf_hall_rogue_5 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -452,6 +488,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$cd%%%%%%%dc==c===e%%%%%%%ec$$ccccxc @@ -485,7 +525,8 @@ NAME: elf_hall_rogue_6 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -497,6 +538,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$ce%%%%%%%eccccccce**|||**ec$$ccccxc @@ -530,7 +575,8 @@ NAME: elf_hall_rogue_7 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -542,6 +588,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$cd|*|||**dcccccccd*||*|**dc$$ccccxc @@ -575,7 +625,8 @@ NAME: elf_hall_rogue_8 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -587,6 +638,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$ce*|||||*ec==ccc=e*|||||*ec$$ccccxc @@ -620,7 +675,8 @@ NAME: elf_hall_rogue_9 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -632,6 +688,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxcccc$$=e**|||**eccccccce%%|%|%%e=$$ccccxc @@ -665,7 +725,8 @@ NAME: elf_hall_rogue_10 PLACE: Elf:7 CHANCE: 1 ORIENT: float -FLAGS: no_rotate +FLAGS: no_rotate +LFLAGS: no_tele_control ITEM: scroll of teleportation, any scroll MONS: deep elf high priest, deep elf demonologist MONS: deep elf annihilator, deep elf sorcerer @@ -677,6 +738,10 @@ SUBST: !=15, ?=.?, ?:23, 4=4. SUBST: % = % *:1 SUBST: | = | *:2 SUBST: * = * |:3 +MARKER: U = lua:feat_change_change_flags { \ + level_flags="!no_tele_control", final_feat="dry_fountain", \ + group="fountain" \ + } MAP ccccccccccccccccccccccccccccccccccccccccccc cxccc====ccccc=======cccc====ccccccccccccxc diff --git a/crawl-ref/source/dat/hells.des b/crawl-ref/source/dat/hells.des index 032d916352..3a00aadf68 100644 --- a/crawl-ref/source/dat/hells.des +++ b/crawl-ref/source/dat/hells.des @@ -203,6 +203,10 @@ NAME: castle_dis PLACE: Dis:7 TAGS: dis ORIENT: north +LFLAGS: no_tele_control +MARKER: O = lua:item_pickup_change_flags { \ + level_flags="!no_tele_control", item="iron rune" \ + } MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -253,6 +257,10 @@ MONS: random, random NAME: asmodeus PLACE: Geh:7 ORIENT: encompass +LFLAGS: no_tele_control +MARKER: O = lua:item_pickup_change_flags { \ + level_flags="!no_tele_control", item="obsidian rune" \ + } MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -337,12 +345,16 @@ MONS: Serpent of Hell, random, random NAME: antaeus_david_1 PLACE: Coc:7 ORIENT: encompass +LFLAGS: no_tele_control MONS: Antaeus, Ice Fiend, ice dragon / nothing ITEM: any, any misc, any misc, any misc SHUFFLE: O1d / e0% / f9* / g8| KMONS: d = ice devil w:5 / Ice Fiend / nothing w:5 KITEM: d = any SUBST: ' = w . +MARKER: O = lua:item_pickup_change_flags { \ + level_flags="!no_tele_control", item="icy rune" \ + } MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -423,9 +435,13 @@ ENDMAP NAME: antaeus_in_days_of_yore PLACE: Coc:7 ORIENT: encompass +LFLAGS: no_tele_control SHUFFLE: $|, 2X SUBST: X=., 3=3. MONS: Antaeus, Ice Fiend, ice dragon, Ice Fiend +MARKER: O = lua:item_pickup_change_flags { \ + level_flags="!no_tele_control", item="icy rune" \ + } MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -508,8 +524,12 @@ ENDMAP NAME: ereshkigal PLACE: Tar:7 ORIENT: encompass +LFLAGS: no_tele_control MONS: Ereshkigal, necrophage, wraith, shadow, small zombie MONS: small skeleton, Shadow Fiend +MARKER: O = lua:item_pickup_change_flags { \ + level_flags="!no_tele_control", item="bone rune" \ + } MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx diff --git a/crawl-ref/source/dat/lair.des b/crawl-ref/source/dat/lair.des index 11bb0086fc..3e516e49ee 100644 --- a/crawl-ref/source/dat/lair.des +++ b/crawl-ref/source/dat/lair.des @@ -606,9 +606,14 @@ ENDMAP NAME: slime_pit PLACE: Slime:6 ORIENT: encompass +LFLAGS: no_tele_control +MARKER: X = lua:mons_dies_change_flags { \ + level_flags="!no_tele_control", mon_name="royal jelly" \ + } MONS: royal jelly, acid blob, great orb of eyes / nothing SUBST: ' : ' .:1, ' : ' x:1, ' = .x SUBST: " : " .:3, " = .c +SUBST: X = . SHUFFLE: ([{ MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -643,7 +648,7 @@ xxxxxxxxxxxx'................"cc**|*cc..cc*|**cc"................'''xxxxxxxxxxxx xxxxxxxxxxxx'................"ccc**c|cc4c|c**ccc"..................xxxxxxxxxxxxx xxxxxxxxxxx'................."cccccccc.3cccccccc"..................'xxxxxxxxxxxx xxxxxxxxxxx'................."c.4.c.4.1..4.c.4.c"..................''xxxxxxxxxxx -xxxxxxxxxxx'..................2.c.4.c....c.4.c.2....................'xxxxxxxxxxx +xxxxxxxxxxx'..................2.c.4.c.X..c.4.c.2....................'xxxxxxxxxxx xxxxxxxxxx'..........)......."cccccccc3.cccccccc"...................'xxxxxxxxxxx xxxxxxxxxx'.................."ccc**c|cc4c|c**ccc"...................'xxxxxxxxxxx xxxxxxxxxx'.................."cc**|*cc..cc*|**cc"..................'xxxxxxxxxxxx diff --git a/crawl-ref/source/dat/vaults.des b/crawl-ref/source/dat/vaults.des index 96dec29926..361e6fe30e 100644 --- a/crawl-ref/source/dat/vaults.des +++ b/crawl-ref/source/dat/vaults.des @@ -364,6 +364,8 @@ ENDMAP NAME: tomb_1 PLACE: Tomb:1 ORIENT: encompass +# The whole branch starts off with teleport control prevention. +BFLAGS: no_tele_control # SHUFFLE: ([{, AB), ]}, FIJKL/fijkl, _- SUBST: A=|*, B=|* @@ -580,6 +582,9 @@ SUBST: $ = *:2 |:1 $:17 # MONS: mummy, guardian mummy, mummy priest, greater mummy # +MARKER: O = lua:item_pickup_change_flags { \ + branch_flags="!no_tele_control", item="golden rune" \ + } MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx diff --git a/crawl-ref/source/dat/zot.des b/crawl-ref/source/dat/zot.des index d832d224a2..9edba91f88 100644 --- a/crawl-ref/source/dat/zot.des +++ b/crawl-ref/source/dat/zot.des @@ -9,6 +9,7 @@ NAME: hall_of_Zot PLACE: Zot:5 ORIENT: north +LFLAGS: no_tele_control #traps SUBST: C = c:1000 = @@ -35,6 +36,10 @@ SUBST: K = 4:30 5 8 9 SUBST: L = 4 5:30 8 9 SUBST: M = 4 5 8:30 9 +MARKER: Z = lua:item_pickup_change_flags { \ + level_flags="!no_tele_control", item="Orb of Zot" \ + } + MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -- cgit v1.2.3-54-g00ecf