minor tweaks

This commit is contained in:
duncathan 2019-03-14 22:05:08 -06:00
parent 6922d3f9ce
commit 8a7644f690
3 changed files with 20 additions and 8 deletions

2
.gitignore vendored
View file

@ -4,3 +4,5 @@ notes/*
src/assets/pre-edited-cs/window\.rect
src/assets/pre-edited-cs/Profile\.dat
src/assets/pre-edited-cs/Doukutsu\.exe\.blbkp

View file

@ -1,6 +1,6 @@
require 'lib.strict'
VERSION = '0.6'
VERSION = '0.8'
Class = require 'lib.classic'
_ = require 'lib.moses'
@ -76,8 +76,8 @@ end
local function _draw()
lg.draw(background, 0, 0)
_print('Cave Story Randomizer v' .. VERSION, 0, 10)
_print('by shru', 0, 22)
_print('Cave Story Randomizer [Open Mode] v' .. VERSION, 0, 10)
_print('by shru and duncathan', 0, 22)
_print(status, 10, 65)
_print('shru.itch.io', 10, 220, 'left')
_print('@shruuu', 10, 220, 'right')

View file

@ -105,22 +105,32 @@ function C:_shuffleItems(tscFiles)
-- first, place puppies in the sand zone
for i=1, 5 do
local puppy = itemDeck:getAnyByAttributes({"puppy"})
local puppy = itemDeck:placeAnyByAttributes({"puppy"})
local puppySpot = worldGraph:getAnyByRegion({"lowerSandZone", "upperSandZone"})
placeItem(puppySpot, puppy)
end
-- next, place weapon at hermit gunsmith and random item in first cave
placeItem(worldGraph:get("gunsmithChest"), itemDeck:getAnyByAttributes({"weaponSN"}))
placeItem(worldGraph:get("firstCapsule"), itemDeck:getAny())
placeItem(worldGraph:get("gunsmithChest"), itemDeck:placeAnyByAttributes({"weaponSN"}))
placeItem(worldGraph:get("firstCapsule"), itemDeck:placeAny())
-- for now, just implementing a forward fill - will do a better fill later
while itemDeck:remaining() > 0 do
local location = worldGraph:getAnyAccessible(itemDeck:getPlacedItems())
local item = itemDeck:getAny()
local item, itemIndex
tscFiles[location.map]:placeItem(location.event, item.script)
while ~location do
item, itemIndex = itemDeck:getAnyByAttributes({"progression"})
location = worldGraph:getAnyAccessible(itemDeck:getPlacedItems(item))
end
if ~item then
item, itemIndex = itemDeck:getAny()
end
itemDeck:place(item, itemIndex)
tscFiles[location.map]:placeItem(location.event, itemData.item.script)
end
end