you.where_are_you dlua binding, further Volcano tweaks.
Signed-off-by: Matthew Cline <zelgadis@sourceforge.net>
OEZE4RQJAPTNNPB3IRHBP2CTLKASHHDADGJIQGP6WJ2ERSEHGNUAC
MQBPIR2ALV2KSE3YLXPBFEGYJBXFOTMGCRYBOEVNPHYGZD5OHAZQC
HVBHW54REDJI3QK47YWKT5I2PB4X6SEAH2NIBHMGD76EOQUBZ2IAC
5XXL4GQNM3PNMZWS3PRAQ2BX3I4XSGCDZG375JPDZGTVNWL6WRRAC
LPTP6ZL7U4OVXLZ56TJKJ6HENDHE7ITFMFBXC5BKEBVXEGXPW44AC
T53JH5GFABPQXENOAMN2C2FAMALAMUAMWNEMGKRSO2YEYALLB3TAC
IJHYMJBOPNFORSDVM4RBZ5ZPLGSFSG6JRTPPYOD4YYWPT4YXNRLQC
XOZNH7FQQQ5B2OWM5GZ5NPUR3NR4FALNHSUTB2MB3ZBWHDMCKJRQC
function make_fiery_mons (e, monster, weapons, armours)
-- Converts a "normal" monster to a fire-themed one through ego weapons and armour.
-- syntax: make_fiery_mons(_G, "monster", {"weapon chance 1", "weapon chance 2"}, {"armour chance 1", "armour chance 2"}) etc.
local monstring = "" .. monster
if weapons ~= False then
monstring = monstring .. " ; "
for _, weapon in ipairs(weapons) do
monstring = monstring .. weapon .. " ego:flaming |"
end
end
if armours ~= False then
monstring = monstring .. " . "
for _, armour in ipairs(armours) do
monstring = monstring .. armour .. " ego:fire_resistance |"
end
end
-- orc, orc, orc, Urug; orc, orc, orc, Blork the orc; orc, orc, orc,
-- orc warrior.
-- orc warrior, orc warrior, orc warrior, Urug; orc warrior, orc warrior,
-- orc warrior, Blork the orc; orc warrior, orc warrior, orc warrior,
-- orc warrior/orc knight.
local human = "human ; short sword ego:flaming | long sword ego:flaming . ring mail ego:fire_resistance"
e.mons("hog / " .. human)
e.mons(human)
-- This is for the village! Wargs and orcs if you came from orc
if you.where_are_you() == 2 then
local orc = "orc warrior ; ring mail ego:fire_resistance race:orcish | leather armour ego:fire_resistance \
race:orcish"
e.mons("warg / " .. orc)
e.mons(orc)
-- But hogs and humans if you came from anywhere else.
else
local human = "human ; short sword ego:flaming | long sword ego:flaming . ring mail ego:fire_resistance"
e.mons("hog / " .. human)
e.mons(human)
end
if crawl.one_chance_in(9) then
-- If we came from orc, we expect to only see orcs.
if you.where_are_you() == 2 then
-- We did, and maybe we'll place a unique.
if crawl.one_chance_in(9) then
e.mons("orc warrior ; spear race:orcish ego:flaming . leather armour ego:fire_resistance")
e.mons(urug .. " / " .. blork .. " / orc warrior ; trident race:orcish ego:flaming . ring mail ego:fire_resistance")
return
end
-- We didn't, and maybe we'll place a unique.
elseif crawl.one_chance_in(9) then
guard_type = "orc warrior"
main_guard = urug .. " / " .. blork .. " / orc warrior ; trident race:orcish ego:flaming . ring mail ego:fire_resistance"
e.mons("human ; scimitar ego:flaming . leather armour ego:fire_resistance")
e.mons(edmund .. " / " .. michael .. " / human ; falchion ego:flaming . scale mail ego:fire_resistance")
guard_type = "human"
main_guard = edmund .. " / " .. michael .. " / human ; falchion ego:flaming . leather armour ego:fire_resistance"
elseif unq_weight < 30 then
guard_type = "big kobold"
main_guard = sonja .. " / big kobold ; long sword ego:flaming . ring mail ego:fire_resistance"
elseif unq_weight <= 50 then
guard_type = "gnoll"
main_guard = grum .. " / gnoll ; halberd ego:flaming"
e.mons("big kobold ; short sword ego:flaming . leather armour ego:fire_resistance")
e.mons("Sonja / big kobold ; long sword ego:flaming . ring mail ego:fire_resistance")
elseif unq_weight <= 40 then
e.mons("gnoll ; halberd ego:flaming | w:2 scythe ego:flaming . scale mail ego:fire_resistance | \
banded mail ego:fire_resistance")
e.mons(grum .. " / gnoll ; glaive ego:flaming . banded mail \
ego:fire_resistance | plate mail ego:fire_resistance")
if tomb then
guard_type = "mummy"
main_guard = menkaure .. " / guardian mummy"
found_guard = true
end
-- If we've reached this stage, we've maybe already found a guardian.
if found_guard then
e.mons(guard_type)
e.mons(main_guard)
-- No unique, orcs!
if you.where_are_you() == 2 then
e.mons("orc warrior ; spear race:orcish ego:flaming . leather armour ego:fire_resistance")
e.mons("orc warrior ; trident race:orcish ego:flaming . ring mail ego:fire_resistance / \
orc knight ; scythe race:orcish ego:flaming . banded mail ego:fire_resistance")
-- We're still going to use a pack of "intelligents".
local pack_weight = crawl.random2(30)
-- "Plain" flavour packs are orcs+orc warrior (maybe an orc knight)
-- kobolds + big kobold (maybe a kobold demonologist), or deep elf
-- soldiers + deep elf fighter.
if pack_weight < 10 then
e.mons("orc warrior")
e.mons("orc warrior / orc knight w:1")
elseif pack_weight < 20 then
e.mons("big kobold")
e.mons("big kobold / kobold demonologist w:2")
elseif pack_weight <= 30 then
e.mons("deep elf fighter" )
e.mons("deep elf fighter / deep elf knight w:3")
if crawl.coinflip() then
e.mons("big kobold ; short sword ego:flaming . leather armour ego:fire_resistance")
e.mons("big kobold ; long sword ego:flaming . ring mail ego:fire_resistance / kobold demonologist w:2")
else
e.mons("deep elf fighter ; sabre ego:flaming race:elven")
e.mons("deep elf fighter ; sabre ego:flaming race:elven . chain mail ego:fire_resistance \
race:elven / deep elf knight w:3 ; sabre ego:flaming race:elven . chain mail \
ego:fire_resistance race:elven")