Attached Files:
|
serial_lair_beast.des [^] (9,805 bytes) 2011-04-16 23:23 [Show Content] [Hide Content]###############################################################################
# serial_lair_beast.des: This file includes a serial vault for the lair, themed after beasts.
# Specifically, HOUNDS and YAKS. The beast family chosen depends on depth.
# Currently the BEAR and ELEPHANT families are too lacking in variety to make an interesting floor theme.
# LIZARD family is implemented but disabled since I think I'll use lizards for serial_lair_aquatic instead
# Some lua shortcuts.
{{
function determine_family()
local rand = crawl.random2(2)
serial_lair_beast_fam = "hound" -- Set a default
-- Higher levels give hounds.
if you.subdepth() < 3 then
serial_lair_beast_fam = "hound"
-- Deeper levels give yaks.
else
serial_lair_beast_fam = "yak"
end
end
-- Populate the vault tags with the correct family of monsters.
function populate_mons(e)
e.mons("plant") -- 1 is always plant.
-- 2 is always the weakest monster type.
-- 3 is randomly the weakest or the tougher type
-- 4 is always the tougher monster type.
-- 5 is always the toughest
-- 6 is the custom monster varient. Use sparingly.
-- 7 is left empty.
if serial_lair_beast_fam=="hound" then
e.mons("hound")
e.mons("hound / wolf")
e.mons("wolf")
e.mons("war_dog w:20 / hell_hound w:1")
alpha_beast(e)
elseif serial_lair_beast_fam=="bear" then
e.mons("black_bear")
e.mons("black_bear / grizzly_bear")
e.mons("grizzly_bear")
e.mons("polar_bear")
alpha_beast(e)
elseif serial_lair_beast_fam=="elephant" then
e.mons("elephant")
e.mons("elephant / elephant")
e.mons("elephant")
e.mons("elephant")
alpha_beast(e)
elseif serial_lair_beast_fam=="lizard" then
e.mons("iguana")
e.mons("iguana / gila_monster")
e.mons("gila_monster")
e.mons("komodo_dragon")
alpha_beast(e)
elseif serial_lair_beast_fam=="yak" then
e.mons("yak")
e.mons("yak / death_yak")
e.mons("death_yak")
e.mons("yaktaur")
alpha_beast(e)
end
end
-- Populate the vault tags with the "standard" settings for serial_lair_beast vaults.
function populate_standard(e)
-- Tools for randomizing environment
e.subst("A = 1:5 .") -- A has a 33% chance of being a plant, 66% chance of being floor.
e.subst("B = x:3 .") -- B has a 23% chance of being a wall, 77% chance of being floor.
e.subst("C = W:3 .") -- C has a 23% chance of being shallow water, 77% chance of being floor.
e.subst("D = Wx1.") -- D has even odds of being shallow water, a wall, a plant of empty floor.
e.subst("E : 1:3 .:9") -- There's a 25% chance that all instances of E in the vault will be converted to plants. This is good for creating optional jungles (unlike B which is better for creating random sprinklings of plantlife).
e.subst("F : x:3 .:9") -- There's a 25% chance that all instances of F in the vault will be converted to walls. This is good for creating optional walls (unlike B which is better for creating random individual walls).
e.subst("G : W:3 .:9") -- There's a 25% chance that all instances of G in the vault will be converted to shallow water. This is good for creating optional ponds (unlike C which is better for creating random spots of water).
-- Tools or randomizin monsters and items
e.subst("M = 4:2 2:5 .:8") -- M, for monster. Has a 12% chance of being a 4 monster, a 33% chance of being a 2 monster, and a 55% chance of being floor.
e.subst("P : 2:2 .") -- P, for pack. There's a 17% chance of all instances of P in the vault will be converted to 2 monsters and a 83% chance they will become floor.
e.subst("L = *:1 %:8 .:5") -- L, for Loot, has a 7% chance of being a good item, 50% chance of being a normal item, 14% chance of being money and a 29% chance of being floor.
e.subst("J = *:1 %:6 .:28") -- J, for junk, has a 17% chance of being a normal item, a 81% chance of being floor, and a tiny 2% chance of being a good item. Useful for when you want to tuck the occasional little bonus into a corner.
-- Universal settings
e.ftile(". = floor_lair") -- floors have lair appearance
e.tags("no_trap_gen")
e.tags("no_monster_gen")
end
function alpha_beast (e)
if serial_lair_beast_fam=="hound" then
e.mons("wolf name:Alpha_Wolf name_replace hd:7 hp:43 \
col:darkgrey tile:mons_wolf; ")
elseif serial_lair_beast_fam=="yak" then
-- There's no named yak. Everything I came up with just felt too artificial. Maybe this could be a _captain?
e.mons("yaktaur")
end
end
}}
# The serial vault definition.
# CHANCE is relatively high because we want at least one of the lair serials to generate per game. Ideally a couple.
NAME: serial_lair_beast
DEPTH: Lair:1-4
CHANCE: 20%
{{
local c = 5 + crawl.random2(2)
determine_family()
hook("post_place", function()
dgn.place_maps{tag="serial_lair_beast", count=c}
end)
}}
# Reset default depth to prevent these vaults from generating randomly.
default-depth:
# The actual maps. More welcome! Add a DEPTH if you want to generate one
# on its own. The slightly bigger maps are first. Most have smaller WEIGHTs
# so that the smaller maps get picked more often.
NAME: serial_lair_beast_carwin_large_1
TAGS: serial_lair_beast
WEIGHT: 7
:populate_mons(_G)
:populate_standard(_G)
MAP
E.EEJ
1 1 ..E.ME
...........1.xxx.ME.
.Axxxxx..xxxx.xxxA..
..xxJ..xx.xx.B.FFxx1.E
..xxx.B........GGxx...
.xxA.....FFxxG..Gxxx.
.x...423...xGGG.GGGx.
..x.AxxxFFFxxG4223Axx.1
..xx..AFFFxx%LL5xxxx..
..Axx..MFxxxxxxxx.xxx.
..x..xxxxAxx......A..
.A............. .
. ..
ENDMAP
NAME: serial_lair_beast_carwin_large_2
TAGS: serial_lair_beast
WEIGHT: 7
:populate_mons(_G)
:populate_standard(_G)
MAP
..1.. 1
.x........
...xxxxxxx.
. ..xxxLxxJxx.
..Ax54....Ex.
.Gxx%4xx..xx.
GGGxLxxxE.xx.
.GGxxxx...xx.
.Gxxxx..EEx..A
..xx31xx..xx....
1.x32..x.xx.. A
.xxx....xx1.
..xxxxEMExx..
.............
ENDMAP
NAME: serial_lair_beast_carwin_large_3
TAGS: serial_lair_beast
WEIGHT: 6
:populate_mons(_G)
:populate_standard(_G)
MAP
..
.......
.........Mxxx...
x xxx.xxxxxxxxx
xxxxM...A......xx
.xxA......xx..M.xx.
..x...xxAA..x22.Mx...
..xx.xxxxxx.xxx..xx..
.xx.xx65LA...x.......
.x..xx%5...x.xxxxx.
......xxxxLx......x..
..xx.MM.2xxx....xxxx.
x...24x....xxx ..
xxxxxxx.xxxxxx x
................
... .
ENDMAP
# This vault is kinda neat because if the Fs become walls (1/4th of the time) it's a
# maze-like warren, but if they become floors it's an open "village".
NAME: serial_lair_beast_carwin_large_4
TAGS: serial_lair_beast
WEIGHT: 6
:populate_mons(_G)
:populate_standard(_G)
SUBST: T:5 6:5
MAP
. .A1
......... ........x .
...xxxA.....xxxx.......x
...x3xxFFFAxx4x...xxxx..x.
..xx.xx..Fx...xFFxx24xA.....
...x3..........2xF....x...x
..FxxF11..FFxxx.x.....xxx.
.......Fx...LF....xx.xx .
.x...xxx..x4Tx.F...F...D 1.
x.Mxxx...xxxxxxx.FFF.D.2WWW
xxxx....x.24xxxxxF...MWWWW
2....xx...Mxxxxx.D..3WWWWWWW
4.. . Ax ..M1WWW W
ENDMAP
NAME: serial_lair_beast_carwin_1
TAGS: serial_lair_beast
:populate_mons(_G)
:populate_standard(_G)
MAP
..
1......
..xxxxx..
.xxM3Axx1..
.xAMJ4xFx.
.A1x.xxxFF.1
..Ax..x...
..xx..x...
.....
ENDMAP
NAME: serial_lair_beast_carwin_2
TAGS: serial_lair_beast
WEIGHT: 3
:populate_mons(_G)
:populate_standard(_G)
ITEM: w:7 meat ration / sausage / beef jerky
SUBST: ?:.
MAP
...
..2..
..3d2..
..2..
...
ENDMAP
NAME: serial_lair_beast_carwin_3
TAGS: serial_lair_beast
WEIGHT: 12
:populate_mons(_G)
:populate_standard(_G)
MAP
1
..
....B..
.xxxx..
.x33xx.1
..xM.Ax.
A.xx.xx.
..B...B
ENDMAP
NAME: serial_lair_beast_carwin_4
TAGS: serial_lair_beast
:populate_mons(_G)
:populate_standard(_G)
MAP
... A
..x....
A.xxxFA..
..x32FFB.
..xxM1x...
.xx..x1.
....FxA
ENDMAP
NAME: serial_lair_beast_carwin_5
TAGS: serial_lair_beast
:populate_mons(_G)
:populate_standard(_G)
MAP
.
...1...
..xxxx......
...3x.xBA.
.x2xx.xxxB
.xJ.2...
1.xxBxxxA
........A
ENDMAP
NAME: serial_lair_beast_carwin_6
TAGS: serial_lair_beast
:populate_mons(_G)
:populate_standard(_G)
MAP
.........
.Axxxx.1
.....GGxx.
..xxxxGGx...
..1xxGG.Gxx.
.xxD24Jxx..
..xx32xxA.
.A.FFFFF..
......
ENDMAP
NAME: serial_lair_beast_carwin_7
TAGS: serial_lair_beast
:populate_mons(_G)
:populate_standard(_G)
MAP
.x....
...x....
..1x.x....
.xx.xx.x..
..xPPxxxxx..x .
Exx3PPx1Jx..x.
E.xxxxx....x.
E.EEx42Pxxx..
..E.xxxxx.x...1
...........
A
ENDMAP
NAME: serial_lair_beast_carwin_8
TAGS: serial_lair_beast
WEIGHT: 6
:populate_mons(_G)
:populate_standard(_G)
MAP
. .. . .. 1 ....... 1
..Axxxx.... . xxxxxx....
..xxGGGxx.xxxxxxxA.1.xxx.
..xGGGGG..M2432M....F..x..
.xxxGGxxxxxxxxxxxxx...xxx..
....G..1 FFA......
ENDMAP
NAME: serial_lair_beast_carwin_9
TAGS: serial_lair_beast
WEIGHT: 7
:populate_mons(_G)
:populate_standard(_G)
MAP
. 1 .
........ .
...xxxxx.....
.AAxxxxxxxx.
..1xxxx5%x....
..xxx.M45xx.
x.....xxx..
...xxxxx... A
...xxxx..x.s
.
ENDMAP
NAME: serial_lair_beast_carwin_10
TAGS: serial_lair_beast
:populate_mons(_G)
:populate_standard(_G)
MAP
AA
.......
.x..xx.xx
...x..xx.
.Axx.4x.
..Jx3xx.
...xxxx1x
.x43xx.1
.xxx.Ax..
.xxx.xx.1
1.........
ENDMAP
NAME: serial_lair_beast_carwin_11
TAGS: serial_lair_beast
:populate_mons(_G)
:populate_standard(_G)
MAP
.E
......xx
..xxxxx..E
..xx2x4xE..
.xx...2xx.
.B.xxxxxx..
... .....E
ENDMAP
serial_lair_beast_02.des [^] (10,147 bytes) 2011-04-18 04:11 [Show Content] [Hide Content]###############################################################################
# serial_lair_beast.des: This file includes a serial vault for the lair,
# themed after beasts.
# Some lua methods first:
{{
function determine_family()
rand = crawl.random2(3) -- Returns 0->(N-1)
serial_lair_beast_fam = "hound" -- Set a default
-- Higher levels give hounds or liards.
if you.subdepth() < 3 then
if rand<1 then
serial_lair_beast_fam = "hound"
elseif rand<2 then
serial_lair_beast_fam = "lizard"
end
-- Deeper levels give yaks, bears or lizards.
else
if rand<1 then
serial_lair_beast_fam = "yak"
elseif rand<2 then
serial_lair_beast_fam = "bear"
else
serial_lair_beast_fam = "lizard"
end
end
end
-- Populate the vault tags with a random type of monster.
-- This method is for the small vaults.
function populate_mons_small(e)
-- Every once in a while, populate with a large_vault monster family.
if crawl.random2(25)>23 then
populate_mons_large(e)
else
-- Array of monsters that are "in the running" to populate this vault.
if you.subdepth() < 4 then
monster_list = {"porcupine","porcupine","iguana","giant toad",
"wolf","yak","war dog","gila monster","spiny frog",
"crocodile","yellow wasp"}
else
monster_list = {"yak","yak","grizzly bear","death yak","elephant",
"spiny frog","komodo dragon","gila monster", "wolf spider",
"wyvern"}
end
-- 1 is always plant.
-- 2,3,4,5,6 are all the same monster type.
-- 7 is left empty.
e.mons("plant")
rand = crawl.random2(table.getn(monster_list))
e.mons(monster_list[rand])
--e.mons("yak / rat")
e.subst("3 = 2")
e.subst("4 = 2")
e.subst("5 = 2")
e.subst("6 = 2")
end
end
-- Populate the vault tags with a random family of monsters.
--- This method is for the large vaults.
function populate_mons_large(e)
e.tags("no_monster_gen")
e.mons("plant") -- 1 is always plant.
determine_family()
-- 2 is always the weakest monster type.
-- 3 is randomly the weakest or the tougher type
-- 4 is always the tougher monster type.
-- 5 is always the toughest
-- 6 is the custom monster varient. Use sparingly.
-- 7 is left empty.
if serial_lair_beast_fam=="hound" then
e.mons("hound")
e.mons("hound / wolf")
e.mons("wolf")
e.mons("war_dog")
alpha_beast(e)
elseif serial_lair_beast_fam=="bear" then
e.mons("black_bear")
e.mons("black_bear / grizzly_bear")
e.mons("grizzly_bear")
e.mons("polar_bear")
e.mons("polar_bear")
elseif serial_lair_beast_fam=="elephant" then
e.mons("elephant")
e.mons("elephant / elephant")
e.mons("elephant")
e.mons("elephant")
e.mons("elephant")
elseif serial_lair_beast_fam=="lizard" then
e.mons("iguana")
e.mons("iguana / gila_monster")
e.mons("gila_monster")
e.mons("komodo_dragon")
e.mons("komodo_dragon")
elseif serial_lair_beast_fam=="yak" then
e.mons("yak")
e.mons("yak / death_yak")
e.mons("death_yak")
e.mons("death_yak")
e.mons("death_yak")
end
end
-- Populate the vault tags with the "standard" settings
-- for serial_lair_beast vaults.
function populate_standard(e)
-- Tools for randomizing environment
-- A has a 33% chance of being a plant, 66% chance of being floor.
e.subst("A = 1:5 .")
-- B has a 23% chance of being a wall, 77% chance of being floor.
e.subst("B = x:3 .")
-- C has a 23% chance of being shallow water, 77% chance of being floor.
e.subst("C = W:3 .")
-- D has even odds of being shallow water, a wall, a plant of empty floor.
e.subst("D = Wx1.")
-- 25% chance that all instances of E in the vault will be plants.
e.subst("E : 1:3 .:9")
-- 25% chance that all instances of F in the vault will be walls.
e.subst("F : x:3 .:9")
-- 25% chance that all instances of G in the vault will be shallow water.
e.subst("G : W:3 .:9")
-- Tools or randomizin monsters and items
-- M, for monster. 33% chance to be 2, 67% chance to be floor.
e.subst("M = 2:4 .:8")
-- P, for pack. 17% chance to be 2, 83% chance to be floor.
e.subst("P : 2:2 .")
-- L (Loot) tiny chance to be good item, high chance to be normal item.
e.subst("L = *:1 % .:5")
-- J (Junk) small chance to be an item, high chance to be nothing.
e.subst("J = %:6 .:28")
-- Universal settings
e.ftile(". = floor_lair") -- floors have lair appearance
e.tags("no_trap_gen")
end
-- spawns an alpha variant of the current family.
function alpha_beast (e)
-- Only hound has alpha beast currently
if serial_lair_beast_fam=="hound" then
e.mons("wolf name:Alpha_Wolf name_replace hd:8 hp:62 \
col:darkgrey tile:mons_wolf; ")
end
end
}}
# The main serial vault definition.
NAME: serial_lair_beast
DEPTH: Lair:1-5
WEIGHT: 30
{{
local c = 5 + crawl.random2(2)
hook("post_place", function()
dgn.place_maps{tag="serial_lair_beast", count=c}
end)
}}
# Reset default depth to prevent these vaults from generating randomly.
default-depth:
# The actual maps. More welcome! Add a DEPTH if you one to generate
# on its own. The slightly bigger maps are first. Most have smaller WEIGHTs
# so that the smaller maps get picked more often.
NAME: serial_lair_beast_carwin_large_1
TAGS: serial_lair_beast
WEIGHT: 7
:populate_mons_large(_G)
:populate_standard(_G)
MAP
E.EEJ
1 1 ..E.ME
...........1.xxx.ME.
.Axxxxx..xxxx.xxxA..
..xxJ..xx.xx.B.FFxx1.E
..xxx.B........GGxx...
.xxA.....FFxxG..Gxxx.
.x...423...xGGG.GGGx.
..x.AxxxFFFxxG4223Axx.1
..xx..AFFFxx%LL5xxxx..
..Axx..MFxxxxxxxx.xxx.
..x..xxxxAxx......A..
.A............. .
. ..
ENDMAP
NAME: serial_lair_beast_carwin_large_2
TAGS: serial_lair_beast
WEIGHT: 7
:populate_mons_large(_G)
:populate_standard(_G)
MAP
..1.. 1
.x........
...xxxxxxx.
. ..xxxLxxJxx.
..Ax54....Ex.
.Gxx%4xx..xx.
GGGxLxxxE.xx.
.GGxxxx...xx.
.Gxxxx..EEx..A
..xx31xx..xx....
1.x32..x.xx.. A
.xxx....xx1.
..xxxxEMExx..
.............
ENDMAP
NAME: serial_lair_beast_carwin_large_3
TAGS: serial_lair_beast
WEIGHT: 5
:populate_mons_large(_G)
:populate_standard(_G)
MAP
..
.......
.........Mxxx...
x xxx.xxxxxxxxx
xxxxM...A......xx
.xxA......xx..M.xx.
..x...xxAA..x22.Mx...
..xx.xxxxxx.xxx..xx..
.xx.xx65LA...x.......
.x..xx%5...x.xxxxx.
......xxxxLx......x..
..xx.MM.2xxx....xxxx.
x...24x....xxx ..
xxxxxxx.xxxxxx x
................
... .
ENDMAP
# This vault is kinda neat because if the Fs become walls (1/4th of the time)
# it's a maze-like warren, but if they become floors it's an open "village".
NAME: serial_lair_beast_carwin_large_4
TAGS: serial_lair_beast
WEIGHT: 6
:populate_mons_large(_G)
:populate_standard(_G)
SUBST: T:5 6:3
MAP
. .A1
......... ........x .
...xxxA.....xxxx.......x
...x3xxFFFAxx4x...xxxx..x.
..xx.xx..Fx...xFFxx24xA.....
...x3..........2xF....x...x
..FxxF11..FFxxx.x.....xxx.
.......Fx...LF....xx.xx .
.x...xxx..x4Tx.F...F...D 1.
x.Mxxx...xxxxxxx.FFF.D.2WWW
xxxx....x.24xxxxxF...MWWWW
2....xx...Mxxxxx.D..3WWWWWWW
4.. . Ax ..M1WWW W
ENDMAP
NAME: serial_lair_beast_carwin_1
TAGS: serial_lair_beast
:populate_mons_small(_G)
:populate_standard(_G)
TAGS: no_monster_gen
MAP
..
1......
..xxxxx..
.xxM3Axx1..
.xAMJ4xFx.
.Axx.xxxFF.1
..1x..x...
..xx..x...
.....
ENDMAP
NAME: serial_lair_beast_carwin_2
TAGS: serial_lair_beast
WEIGHT: 2
:populate_mons_small(_G)
:populate_standard(_G)
ITEM: w:7 meat ration / sausage / beef jerky
SUBST: ?:.
MAP
...
..2..
..3d2..
..2..
...
ENDMAP
NAME: serial_lair_beast_carwin_3
TAGS: serial_lair_beast
:populate_mons_small(_G)
:populate_standard(_G)
TAGS: no_monster_gen
MAP
1
..
....B..
.xxxx..
..x33xx.1
.xxM.Ax.
A.xx.xx.
..B...B
ENDMAP
NAME: serial_lair_beast_carwin_4
TAGS: serial_lair_beast
:populate_mons_small(_G)
:populate_standard(_G)
MAP
... A
..x....
A.xxxFA..
..x32FFB.
..xxM1x...
.xx..x1.
....FxA
ENDMAP
NAME: serial_lair_beast_carwin_5
TAGS: serial_lair_beast
:populate_mons_small(_G)
:populate_standard(_G)
MAP
.
...1...
..xxxx......
...3x.xBA.
.x2xx.xxxB
.xJ.2...
1.xxBxxxA
........A
ENDMAP
NAME: serial_lair_beast_carwin_6
TAGS: serial_lair_beast
:populate_mons_small(_G)
:populate_standard(_G)
TAGS: no_monster_gen
MAP
.........
.Axxxx.1
.....GGxx.
..xxxxGGx...
..1xxGG.Gxx.
.xxD24Jxx..
..xx32xxA.
.A.FFFFF..
......
ENDMAP
NAME: serial_lair_beast_carwin_7
TAGS: serial_lair_beast
:populate_mons_small(_G)
:populate_standard(_G)
TAGS: no_monster_gen
MAP
.x....
...x....
..1x.x....
.xx.xx.x..
..xPPxxxxx..x .
Exx3PPx1Jx..x.
E.xxxxx....x.
E.EEx42Pxxx..
..E.xxxxx.x...1
...........
A
ENDMAP
NAME: serial_lair_beast_carwin_8
TAGS: serial_lair_beast
WEIGHT: 6
:populate_mons_small(_G)
:populate_standard(_G)
MAP
. .. . .. 1 ....... 1
..Axxxx.... . xxxxxx....
..xxGGGxx.xxxxxxA.1.xxx.
..xGGGGG..M243.....F..x..
.xxxGGxxxxxxxxxxxx...xxx..
....G..1 FFA......
ENDMAP
NAME: serial_lair_beast_carwin_9
TAGS: serial_lair_beast
WEIGHT: 7
TAGS: no_monster_gen
:populate_mons_small(_G)
:populate_standard(_G)
MAP
. 1 .
........ .
...xxxxx.....
.AAxxxxxxxx.
..1xxxx5Lx....
..xxx.M45xx.
x.....xxx..
...xxxxx... A
...xxxx..x.s
.
ENDMAP
NAME: serial_lair_beast_carwin_10
TAGS: serial_lair_beast
TAGS: no_monster_gen
:populate_mons_small(_G)
:populate_standard(_G)
MAP
AA
.......
.x..xx.xx
...x..xx.
.Axx.4x.
..Jx3xx.
...xxxx1x
.x43xx.1
.xxx.Ax..
.xxx.xx.1
1.........
ENDMAP
NAME: serial_lair_beast_carwin_11
TAGS: serial_lair_beast
TAGS: no_monster_gen
:populate_mons_small(_G)
:populate_standard(_G)
MAP
.E
. .......xx
..xxxxx..E
..xx2x4xE..
.xx...2xx.
..B.xxxxxx..
... .....E
ENDMAP
|