mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-11-25 08:13:15 +00:00
Merge pull request #111 from duncathan/hints
improves hints, fixes #109
This commit is contained in:
commit
2708aef353
|
@ -3,7 +3,7 @@ local function lifeCapsule3()
|
||||||
name = "Life Capsule",
|
name = "Life Capsule",
|
||||||
script = "<EVE0012",
|
script = "<EVE0012",
|
||||||
attributes = {"nonProgressive", "hp3", "helpful"},
|
attributes = {"nonProgressive", "hp3", "helpful"},
|
||||||
hints = {"a Life Capsule", "some health", "a little HP"}
|
hints = {"a Life Capsule", "a little HP"}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
local function lifeCapsule4()
|
local function lifeCapsule4()
|
||||||
|
@ -11,7 +11,7 @@ local function lifeCapsule4()
|
||||||
name = "Life Capsule",
|
name = "Life Capsule",
|
||||||
script = "<EVE0013",
|
script = "<EVE0013",
|
||||||
attributes = {"nonProgressive", "hp4", "helpful"},
|
attributes = {"nonProgressive", "hp4", "helpful"},
|
||||||
hints = {"a Life Capsule", "some health", "some decent HP"}
|
hints = {"a Life Capsule", "some decent HP"}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
local function lifeCapsule5()
|
local function lifeCapsule5()
|
||||||
|
@ -19,7 +19,7 @@ local function lifeCapsule5()
|
||||||
name = "Life Capsule",
|
name = "Life Capsule",
|
||||||
script = "<EVE0014",
|
script = "<EVE0014",
|
||||||
attributes = {"nonProgressive", "hp5", "helpful"},
|
attributes = {"nonProgressive", "hp5", "helpful"},
|
||||||
hints = {"a Life Capsule", "some health", "a lot of HP"}
|
hints = {"a Life Capsule", "a lot of HP"}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -119,13 +119,13 @@ local function _itemData()
|
||||||
name = "Map System",
|
name = "Map System",
|
||||||
script = "<EVE0052",
|
script = "<EVE0052",
|
||||||
attributes = {"nonProgressive", "map"},
|
attributes = {"nonProgressive", "map"},
|
||||||
hints = {"the Map System", "a map", "an electronic device"}
|
hints = {"a map", "an electronic device"}
|
||||||
},
|
},
|
||||||
locket = {
|
locket = {
|
||||||
name = "Silver Locket",
|
name = "Silver Locket",
|
||||||
script = "<EVE0054",
|
script = "<EVE0054",
|
||||||
attributes = {"mandatory"},
|
attributes = {"mandatory"},
|
||||||
hints = {"the Silver Locket", "some fishy jewelry", "a Mimiga's item"}
|
hints = {"some fishy jewelry", "a Mimiga's item"}
|
||||||
},
|
},
|
||||||
arthurKey = {
|
arthurKey = {
|
||||||
name = "Arthur's Key",
|
name = "Arthur's Key",
|
||||||
|
@ -149,13 +149,13 @@ local function _itemData()
|
||||||
name = "Chaco's Lipstick",
|
name = "Chaco's Lipstick",
|
||||||
script = "<EVE0087",
|
script = "<EVE0087",
|
||||||
attributes = {"nonProgressive", "useless"},
|
attributes = {"nonProgressive", "useless"},
|
||||||
hints = {"Chaco's Lipstick", "some lipstick", "a Mimiga's item", "a lewd item"}
|
hints = {"some lipstick", "a Mimiga's item", "a lewd item"}
|
||||||
},
|
},
|
||||||
juice = {
|
juice = {
|
||||||
name = "Jellyfish Juice",
|
name = "Jellyfish Juice",
|
||||||
script = "<EVE0058",
|
script = "<EVE0058",
|
||||||
attributes = {"mandatory"},
|
attributes = {"mandatory"},
|
||||||
hints = {"some Jellyfish Juice", "a bomb ingredient"}
|
hints = {"some juice", "a bomb ingredient"}
|
||||||
},
|
},
|
||||||
charcoal = {
|
charcoal = {
|
||||||
name = "Charcoal",
|
name = "Charcoal",
|
||||||
|
@ -414,14 +414,14 @@ local function _itemData()
|
||||||
}
|
}
|
||||||
|
|
||||||
local hintArray = {
|
local hintArray = {
|
||||||
mandatory = {"a required item"},
|
--mandatory = {"a required item"},
|
||||||
puppy = {"a required item", "a puppy", "a living being"},
|
puppy = {"a puppy", "a living being"},
|
||||||
helpful = {"a helpful item"},
|
--helpful = {"a helpful item"},
|
||||||
useless = {"a useless item"},
|
--useless = {"a useless item"},
|
||||||
weapon = {"a weapon"},
|
weapon = {"a weapon"},
|
||||||
weaponSN = {"a weapon that breaks blocks"},
|
--weaponSN = {"a weapon that breaks blocks"},
|
||||||
weaponStrong = {"a strong weapon"},
|
--weaponStrong = {"a strong weapon"},
|
||||||
flight = {"a pair of wings", "a method of flight", "flight"},
|
flight = {"a method of flight", "flight"},
|
||||||
missileLauncher = {"a Missile upgrade"}
|
missileLauncher = {"a Missile upgrade"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ function C:unplacedString()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function _hint(message, l)
|
local function _hint(message, l)
|
||||||
local MSGBOXLIMIT = 42
|
local MSGBOXLIMIT = 35
|
||||||
local PATTERN = " [^ ]*$"
|
local PATTERN = " [^ ]*$"
|
||||||
local line1, line2, line3 = "", "", ""
|
local line1, line2, line3 = "", "", ""
|
||||||
|
|
||||||
|
@ -510,7 +510,7 @@ local function _hint(message, l)
|
||||||
|
|
||||||
if line2:find(PATTERN) and #message > MSGBOXLIMIT*2 then
|
if line2:find(PATTERN) and #message > MSGBOXLIMIT*2 then
|
||||||
line2 = line2:sub(1, line2:find(PATTERN))
|
line2 = line2:sub(1, line2:find(PATTERN))
|
||||||
split = line2:find(PATTERN)+split
|
split = line2:find(PATTERN)+split-2
|
||||||
line3 = "\r\n" .. message:sub(split, split+MSGBOXLIMIT)
|
line3 = "\r\n" .. message:sub(split, split+MSGBOXLIMIT)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue