mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-11-22 06:43:03 +00:00
Randomize location of missiles.
This commit is contained in:
parent
627f689d9c
commit
58389f1872
|
@ -4,5 +4,6 @@ Cave Story Randomizer
|
|||
Issues
|
||||
------
|
||||
|
||||
- 3 Life Capsules can not be replaced because they appear on maps with 2 capsules. Need label-aware replace.
|
||||
- Hell Missile Upgrade uses a unique script and won't be easy to replace.
|
||||
- Bubbler (and other weapons?) can't break blocks in the First Cave.
|
||||
- Unable to create /data/Stage directories.
|
||||
|
|
|
@ -29,6 +29,22 @@ function lifeCapsule(t)
|
|||
}
|
||||
end
|
||||
|
||||
function missiles(t)
|
||||
assert(t.map)
|
||||
return {
|
||||
name = "Missiles",
|
||||
map = t.map,
|
||||
getText = {
|
||||
"",
|
||||
"Opened the treasure chest.<NOD", -- Normal case
|
||||
"Opened the treasure chest.", -- WeedB (fight with Kulala.)
|
||||
},
|
||||
command = "<EVE0030",
|
||||
displayCmd = "",
|
||||
music = "",
|
||||
}
|
||||
end
|
||||
|
||||
function item(t)
|
||||
assert(t.name and t.map and t.id and t.getText)
|
||||
return {
|
||||
|
@ -128,6 +144,32 @@ return {
|
|||
label = "0400"
|
||||
}),
|
||||
|
||||
--------------
|
||||
-- MISSILES --
|
||||
--------------
|
||||
mEggObservation = missiles({
|
||||
map = "EggR",
|
||||
}),
|
||||
mGrasslands = missiles({
|
||||
map = "Weed",
|
||||
}),
|
||||
mGrasslandsHut = missiles({
|
||||
map = "WeedB",
|
||||
}),
|
||||
mEggRuined = missiles({
|
||||
map = "Eggs2",
|
||||
}),
|
||||
mEggObservationRuined = missiles({
|
||||
map = "EggR2",
|
||||
label = "0302",
|
||||
}),
|
||||
-- !!!! Uses a unique script... will have to be crafty... !!!!
|
||||
-- [Sanctuary] Bonus expansion. Just before you fight the Heavy Press at the
|
||||
-- far west end of Blood-Stained Sanctuary B3, just past the pillar with 3 Deletes
|
||||
-- covering it, in the room filled with flying Butes and with a hanging platform
|
||||
-- with an arrow Bute on either side. Above this platform is a single Star Block
|
||||
-- concealing a chest containing this massive expansion of 24 Misisles.
|
||||
|
||||
-----------
|
||||
-- ITEMS --
|
||||
-----------
|
||||
|
@ -219,4 +261,16 @@ Found Curly's Panties.<NOD<END
|
|||
<MSG<GIT1006Got a =Life Capsule=!<WAI0160<NOD<RMU<ML+0004
|
||||
Max health increased by 4!<NOD<END
|
||||
|
||||
-- Missiles
|
||||
|
||||
#0300
|
||||
<PRI<FLJ0200:0001<FL+0200
|
||||
<SOU0022<CNP0300:0021:0000
|
||||
<MSGOpened the treasure chest.<NOD<CLR<EVE0030
|
||||
|
||||
#0302
|
||||
<PRI<FLJ0218:0001<FL+0218
|
||||
<SOU0022<CNP0302:0021:0000
|
||||
<MSGOpened the treasure chest.<NOD<EVE0030
|
||||
|
||||
]]
|
||||
|
|
12
src/main.lua
12
src/main.lua
|
@ -29,17 +29,6 @@ do
|
|||
end
|
||||
end
|
||||
|
||||
-- function love.load()
|
||||
-- local sourcePath = lf.getSourceBaseDirectory()
|
||||
-- local info = lf.getInfo(sourcePath .. '/data')
|
||||
-- local items = lf.getDirectoryItems(sourcePath)
|
||||
-- print(Serpent.block(items))
|
||||
-- print(Serpent.block(info))
|
||||
-- if info == nil then
|
||||
-- print()
|
||||
-- end
|
||||
-- end
|
||||
|
||||
function love.directorydropped(path)
|
||||
-- Mount.
|
||||
local mountPath = 'mounted-data'
|
||||
|
@ -85,6 +74,7 @@ function love.directorydropped(path)
|
|||
|
||||
-- Unmount.
|
||||
assert(lf.unmount(path))
|
||||
print("\n")
|
||||
end
|
||||
|
||||
function love.keypressed(key)
|
||||
|
|
|
@ -74,13 +74,16 @@ function C:_replaceAttribute(original, replacement, attribute)
|
|||
end
|
||||
|
||||
-- Loop through each possible original value until we successfully replace one.
|
||||
for _, originalText in ipairs(originalTexts) do
|
||||
for _, originalText in ipairs(originalTexts) do repeat
|
||||
if originalText == "" then
|
||||
break -- continue
|
||||
end
|
||||
local changed
|
||||
self._text, changed = self:_stringReplace(self._text, originalText, replaceText)
|
||||
if changed then
|
||||
return
|
||||
end
|
||||
end
|
||||
until true end
|
||||
|
||||
local template = 'Unable to replace original "%s" for [%s] %s.'
|
||||
logWarning(template:format(attribute, original.map, original.name))
|
||||
|
|
Loading…
Reference in a new issue