Added Life Pot.

This commit is contained in:
shru 2018-12-15 14:10:40 -05:00
parent e02ce13c62
commit 627f689d9c
2 changed files with 28 additions and 5 deletions

View file

@ -29,6 +29,18 @@ function lifeCapsule(t)
} }
end end
function item(t)
assert(t.name and t.map and t.id and t.getText)
return {
name = t.name,
map = t.map,
getText = t.getText,
command = ("<IT+00%s"):format(t.id),
displayCmd = ("<GIT10%s"):format(t.id),
music = t.music or "<CMU0010"
}
end
return { return {
------------------- -------------------
-- WEAPONS -- -- WEAPONS --
@ -69,6 +81,7 @@ return {
-- lEggCorridorB = lifeCapsule({ -- lEggCorridorB = lifeCapsule({
-- hp = 4, -- hp = 4,
-- map = "Eggs", -- map = "Eggs",
-- label = "0401"
-- }), -- }),
lGrasstown = lifeCapsule({ lGrasstown = lifeCapsule({
hp = 5, hp = 5,
@ -118,16 +131,23 @@ return {
----------- -----------
-- ITEMS -- -- ITEMS --
----------- -----------
iPanties = { iPanties = item({
name = "Curly's Panties", name = "Curly's Panties",
map = "CurlyS", map = "CurlyS",
id = "35",
getText = { getText = {
"Found =Curly's Panties=.", "Found =Curly's Panties=.",
"Found =Curly's Underwear=.", "Found =Curly's Underwear=.",
}, },
command = "<IT+0035", music = "",
displayCmd = "<GIT1035", }),
}, iLifePot = item({
name = "Life Pot",
map = "Cent",
id = "15",
getText = "Got a =Life Pot=!",
label = "0450",
}),
} }
--[[ --[[
@ -189,6 +209,9 @@ Max health increased by 5!<NOD<END
<KEY<DNP0420<MSG<GIT1035<IT+0035 <KEY<DNP0420<MSG<GIT1035<IT+0035
Found Curly's Panties.<NOD<END Found Curly's Panties.<NOD<END
<CMU0010<GIT1015<IT+0015<GIT1015Got a =Life Pot=!<WAI0160<NOD<GIT0000<RMU<EVE0451
<END
-- TODO: -- TODO:
#0401 #0401

View file

@ -62,7 +62,7 @@ end
function C:_replaceAttribute(original, replacement, attribute) function C:_replaceAttribute(original, replacement, attribute)
local originalTexts = original[attribute] local originalTexts = original[attribute]
if originalTexts == nil then if originalTexts == nil or originalTexts == '' then
return return
elseif type(originalTexts) == 'string' then elseif type(originalTexts) == 'string' then
originalTexts = {originalTexts} originalTexts = {originalTexts}