Skip to content

Commit

Permalink
Merge branch 'patch'
Browse files Browse the repository at this point in the history
  • Loading branch information
jangler committed Nov 6, 2021
2 parents 28fd8f7 + f6d88bb commit 6675d65
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 16 deletions.
5 changes: 4 additions & 1 deletion asm/cutscenes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ seasons:
ld hl,6314
call interactionSetScript
ld a,15
jp setGlobalFlag
call setGlobalFlag
ld hl,c716
set 0,(hl) # affects tileSubTable
ret
# drop link below bushes at game start, not above
07/4197/: db 58
Expand Down
4 changes: 4 additions & 0 deletions asm/layouts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ seasons:
# data for applyAllTileSubstitutions: group,room,flags,yx,tile
04/tileSubTable: |
db 00,01,01,52,04 # permanently remove flower outside D6 when cut
db 00,16,01,18,0f # add walkable tile outside temple remains door
db 00,16,01,17,64 # ^ and replace the rest of the tree with rocks
db 00,16,01,27,64 # ^
db 00,16,01,28,70 # ^
db 00,25,00,32,3a # add ledge down from temple remains lower portal
db 00,25,00,33,cf # ^
db 00,25,00,34,4b # ^
Expand Down
9 changes: 9 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module github.com/jangler/oracles-randomizer

go 1.16

require (
github.com/gdamore/tcell v1.4.0
github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9
gopkg.in/yaml.v2 v2.4.0
)
22 changes: 22 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
github.com/gdamore/tcell v1.4.0 h1:vUnHwJRvcPQa3tzi+0QI4U9JINXYJlOz9yiaiPQ2wMU=
github.com/gdamore/tcell v1.4.0/go.mod h1:vxEiSDZdW3L+Uhjii9c3375IlDmR05bzxY404ZVSMo0=
github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac=
github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9 h1:k/gmLsJDWwWqbLCur2yWnJzwQEKRcAHXo6seXGuSwWw=
github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756 h1:9nuHUbU8dRnRRfj9KjWUVrJeoexdbeMjttk6Oh1rD10=
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
13 changes: 4 additions & 9 deletions logic/holodrum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,21 +280,16 @@ temple remains lower stump: {or: [
or: [spring, temple remains default spring]]]]]],
[exit temple remains upper portal, feather,
# make sure you can get down
or: [bomb temple remains, winter, temple remains default winter,
[break bush, or: [autumn, [hard, jump 6,
or: [temple remains not spring, break flower]]]]],
# important: default season is not loaded coming from the upper portal
or: [bomb temple remains, winter,
[break bush, or: [autumn, [hard, jump 6, break flower]]]],
# then make sure you can get back up
or: [gale satchel,
[bomb temple remains,
or: [summer, temple remains default summer],
or: [summer, [jump 3, temple remains default summer]],
or: [jump 6, [bomb jump 2, magnet gloves]]]]],
[goron mountain, or: [flippers, bomb jump 4], jump 3],
[blaino's gym, jump 3]]}
# this is from the upper stump
temple remains not spring: {or: [
winter, temple remains default winter,
summer, temple remains default summer,
autumn, temple remains default autumn]}

# northern peak
maku seed: [sword, d1 boss, d2 boss, d3 boss, d4 boss, d5 boss, d6 boss,
Expand Down
3 changes: 1 addition & 2 deletions logic/portals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ exit house of pirates portal: {or: []}
enter temple remains lower portal: [temple remains lower stump, or: [
[bomb temple remains, feather],
[or: [temple remains default winter, winter], or: [
[exit temple remains upper portal,
or: [temple remains default winter, feather]],
[exit temple remains upper portal, feather, winter],
[hard, shovel, break bush, jump 6],
[hard, or: [temple remains default spring, spring],
break flower, break bush, jump 6, winter],
Expand Down
12 changes: 10 additions & 2 deletions randomizer/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (rom *romState) replaceRaw(addr address, label, data string) string {
// returns a byte table of (group, room, collect mode, player) entries for
// randomized items. a mode >7f means to use &7f as an index to a jump table
// for special cases.
func makeCollectPropertiesTable(itemSlots map[string]*itemSlot) string {
func makeCollectPropertiesTable(game, player int, itemSlots map[string]*itemSlot) string {
b := new(strings.Builder)
for _, key := range orderedKeys(itemSlots) {
slot := itemSlots[key]
Expand All @@ -92,6 +92,14 @@ func makeCollectPropertiesTable(itemSlots map[string]*itemSlot) string {
}
}

// linked hero's cave
if game == gameSeasons {
// don't play linked multiworld please
if _, err := b.Write([]byte{0x05, 0x2c, collectModes["chest"], byte(player)}); err != nil {
panic(err)
}
}

b.Write([]byte{0xff})
return b.String()
}
Expand Down Expand Up @@ -403,7 +411,7 @@ func (rom *romState) initBanks() {
roomTreasureBank := byte(sora(rom.game, 0x3f, 0x38).(int))
numOwlIds := sora(rom.game, 0x1e, 0x14).(int)
rom.replaceRaw(address{0x06, 0}, "collectPropertiesTable",
makeCollectPropertiesTable(rom.itemSlots))
makeCollectPropertiesTable(rom.game, rom.player, rom.itemSlots))
rom.replaceRaw(address{roomTreasureBank, 0}, "roomTreasures",
makeRoomTreasureTable(rom.game, rom.itemSlots))
rom.replaceRaw(address{0x3f, 0}, "owlTextOffsets",
Expand Down
2 changes: 1 addition & 1 deletion randomizer/rom.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (rom *romState) mutate(warpMap map[string]string, seed uint32,

// regenerate collect mode table to accommodate changes based on contents.
rom.codeMutables["collectPropertiesTable"].new =
[]byte(makeCollectPropertiesTable(rom.itemSlots))
[]byte(makeCollectPropertiesTable(rom.game, rom.player, rom.itemSlots))

// set the text IDs for all rings to $ff (blank), since custom code deals
// with text
Expand Down
1 change: 0 additions & 1 deletion romdata/seasons_slots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ d0 sword chest:
d0 rupee chest:
treasure: rupees, 30
room: 0x0405
morerooms: [0x052c] # linked equivalent

# d1
d1 stalfos drop:
Expand Down

0 comments on commit 6675d65

Please sign in to comment.