Merged DR v0.4.0.2
This commit is contained in:
@@ -379,8 +379,11 @@ take_any_locations = [
|
|||||||
|
|
||||||
|
|
||||||
def set_up_take_anys(world, player):
|
def set_up_take_anys(world, player):
|
||||||
if world.mode[player] == 'inverted' and 'Dark Sanctuary Hint' in take_any_locations:
|
if world.mode[player] == 'inverted':
|
||||||
take_any_locations.remove('Dark Sanctuary Hint')
|
if 'Dark Sanctuary Hint' in take_any_locations:
|
||||||
|
take_any_locations.remove('Dark Sanctuary Hint')
|
||||||
|
if 'Archery Game' in take_any_locations:
|
||||||
|
take_any_locations.remove('Archery Game')
|
||||||
|
|
||||||
regions = random.sample(take_any_locations, 5)
|
regions = random.sample(take_any_locations, 5)
|
||||||
|
|
||||||
|
|||||||
2
Main.py
2
Main.py
@@ -29,7 +29,7 @@ from Fill import sell_potions, sell_keys, balance_multiworld_progression, balanc
|
|||||||
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops
|
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops
|
||||||
from Utils import output_path, parse_player_names
|
from Utils import output_path, parse_player_names
|
||||||
|
|
||||||
__version__ = '0.4.0.0-u'
|
__version__ = '0.4.0.2-u'
|
||||||
|
|
||||||
|
|
||||||
class EnemizerError(RuntimeError):
|
class EnemizerError(RuntimeError):
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ import yaml
|
|||||||
from DungeonRandomizer import parse_cli
|
from DungeonRandomizer import parse_cli
|
||||||
from Main import main as DRMain
|
from Main import main as DRMain
|
||||||
from source.classes.BabelFish import BabelFish
|
from source.classes.BabelFish import BabelFish
|
||||||
|
from yaml.constructor import SafeConstructor
|
||||||
|
|
||||||
|
def add_bool(self, node):
|
||||||
|
return self.construct_scalar(node)
|
||||||
|
|
||||||
|
SafeConstructor.add_constructor(u'tag:yaml.org,2002:bool', add_bool)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(add_help=False)
|
parser = argparse.ArgumentParser(add_help=False)
|
||||||
|
|||||||
@@ -6,8 +6,26 @@ Thanks to qadan, cheuer, & compiling
|
|||||||
|
|
||||||
# Bug Fixes and Notes.
|
# Bug Fixes and Notes.
|
||||||
|
|
||||||
|
* 0.4.0.2
|
||||||
|
* Fixed a bug where Defeat Ganon is not possible
|
||||||
|
* Fixed the item counter total
|
||||||
|
* Fixed the bunny state when starting out in Sanc in a dark world dungeon
|
||||||
* 0.4.0.1
|
* 0.4.0.1
|
||||||
* Moved stonewall pre-opening to not happen in experimental
|
* Moved stonewall pre-opening to not happen in experimental
|
||||||
|
* Updated baserom
|
||||||
|
* Boss RNG perseved between files
|
||||||
|
* Vanilla prize pack fix
|
||||||
|
* Starting equipment fix
|
||||||
|
* Post-Aga world state option
|
||||||
|
* Code optimzation
|
||||||
|
* Bottle quickswap via double shoulder
|
||||||
|
* Credits update
|
||||||
|
* Accessibility option
|
||||||
|
* Sewer map/compass fix
|
||||||
|
* Fixed a standard bug where the exits to the ledge would be unavailable if the pyramid was pre-opened
|
||||||
|
* DR ASM optimization
|
||||||
|
* Removed Archery Game from Take-Any caves in inverted
|
||||||
|
* Fixed a problem with new YAML parser
|
||||||
* 0.4.0.0
|
* 0.4.0.0
|
||||||
* Mystery yaml parser updated to a package maintained version (Thanks StructuralMike)
|
* Mystery yaml parser updated to a package maintained version (Thanks StructuralMike)
|
||||||
* Bomb-logic and extend crystal switch logic (Thanks StructuralMike)
|
* Bomb-logic and extend crystal switch logic (Thanks StructuralMike)
|
||||||
|
|||||||
28
Rom.py
28
Rom.py
@@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids
|
|||||||
|
|
||||||
|
|
||||||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||||
RANDOMIZERBASEHASH = '5ea3196d8db3ca0c757035f7fd51cf9b'
|
RANDOMIZERBASEHASH = '5c5111bcb73b033ddf72be5b8ea08a8e'
|
||||||
|
|
||||||
|
|
||||||
class JsonRom(object):
|
class JsonRom(object):
|
||||||
@@ -806,15 +806,17 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
|
|||||||
|
|
||||||
write_int16(rom, 0x187010, credits_total) # dynamic credits
|
write_int16(rom, 0x187010, credits_total) # dynamic credits
|
||||||
if credits_total != 216:
|
if credits_total != 216:
|
||||||
# collection rate address: 238C37
|
# collection rate address:
|
||||||
|
cr_address = 0x2391BE
|
||||||
|
cr_pc = cr_address - 0x120000 # convert to pc
|
||||||
mid_top, mid_bot = credits_digit((credits_total // 10) % 10)
|
mid_top, mid_bot = credits_digit((credits_total // 10) % 10)
|
||||||
last_top, last_bot = credits_digit(credits_total % 10)
|
last_top, last_bot = credits_digit(credits_total % 10)
|
||||||
# top half
|
# top half
|
||||||
rom.write_byte(0x118C53, mid_top)
|
rom.write_byte(cr_pc+0x1c, mid_top)
|
||||||
rom.write_byte(0x118C54, last_top)
|
rom.write_byte(cr_pc+0x1d, last_top)
|
||||||
# bottom half
|
# bottom half
|
||||||
rom.write_byte(0x118C71, mid_bot)
|
rom.write_byte(cr_pc+0x3a, mid_bot)
|
||||||
rom.write_byte(0x118C72, last_bot)
|
rom.write_byte(cr_pc+0x3b, last_bot)
|
||||||
|
|
||||||
if world.keydropshuffle[player] or world.doorShuffle[player] != 'vanilla':
|
if world.keydropshuffle[player] or world.doorShuffle[player] != 'vanilla':
|
||||||
gt = world.dungeon_layouts[player]['Ganons Tower']
|
gt = world.dungeon_layouts[player]['Ganons Tower']
|
||||||
@@ -822,16 +824,18 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
|
|||||||
total = 0
|
total = 0
|
||||||
for region in gt.master_sector.regions:
|
for region in gt.master_sector.regions:
|
||||||
total += count_locations_exclude_logic(region.locations, gt_logic)
|
total += count_locations_exclude_logic(region.locations, gt_logic)
|
||||||
rom.write_byte(0x187012, total) # dynamic credits
|
# rom.write_byte(0x187012, total) # dynamic credits
|
||||||
# gt big key address: 238B59
|
# gt big key address:
|
||||||
|
gtbk_address = 0x2390E0
|
||||||
|
gtbk_pc = gtbk_address - 0x120000 # convert to pc
|
||||||
mid_top, mid_bot = credits_digit(total // 10)
|
mid_top, mid_bot = credits_digit(total // 10)
|
||||||
last_top, last_bot = credits_digit(total % 10)
|
last_top, last_bot = credits_digit(total % 10)
|
||||||
# top half
|
# top half
|
||||||
rom.write_byte(0x118B75, mid_top)
|
rom.write_byte(gtbk_pc+0x1c, mid_top)
|
||||||
rom.write_byte(0x118B76, last_top)
|
rom.write_byte(gtbk_pc+0x1d, last_top)
|
||||||
# bottom half
|
# bottom half
|
||||||
rom.write_byte(0x118B93, mid_bot)
|
rom.write_byte(gtbk_pc+0x3a, mid_bot)
|
||||||
rom.write_byte(0x118B94, last_bot)
|
rom.write_byte(gtbk_pc+0x3b, last_bot)
|
||||||
|
|
||||||
# patch medallion requirements
|
# patch medallion requirements
|
||||||
if world.required_medallions[player][0] == 'Bombos':
|
if world.required_medallions[player][0] == 'Bombos':
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
CheckDarkWorldSanc:
|
CheckDarkWorldSanc:
|
||||||
STA $A0 : STA $048E ; what we wrote over
|
STA $A0 : STA $048E ; what we wrote over
|
||||||
LDA.l InvertedMode : BNE +
|
LDA.l InvertedMode : AND #$00FF : BNE +
|
||||||
LDA.l SancDarkWorldFlag : BEQ +
|
LDA.l SancDarkWorldFlag : AND #$00FF : BEQ +
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA $A0 : CMP #$12 : BNE ++
|
LDA $A0 : CMP #$12 : BNE ++
|
||||||
LDA.l $7EF357 : BNE ++ ; moon pearl?
|
LDA.l $7EF357 : BNE ++ ; moon pearl?
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ DrHudDungeonItemsAdditions:
|
|||||||
- sta $1704, x : sta $170e, x : sta $1718, x
|
- sta $1704, x : sta $170e, x : sta $1718, x
|
||||||
inx #2 : cpx #$0008 : !blt -
|
inx #2 : cpx #$0008 : !blt -
|
||||||
|
|
||||||
lda !HUD_FLAG : and.w #$0020 : beq + : brl ++ : +
|
lda !HUD_FLAG : and.w #$0020 : beq + : JMP ++ : +
|
||||||
lda HUDDungeonItems : and.w #$0007 : bne + : brl ++ : +
|
lda HUDDungeonItems : and.w #$0007 : bne + : JMP ++ : +
|
||||||
; bk symbols
|
; bk symbols
|
||||||
lda.w #$2811 : sta $1606 : sta $1610 : sta $161a : sta $1624
|
lda.w #$2811 : sta $1606 : sta $1610 : sta $161a : sta $1624
|
||||||
; sm symbols
|
; sm symbols
|
||||||
@@ -125,10 +125,10 @@ DrHudDungeonItemsAdditions:
|
|||||||
lda.w #$24f5 : sta $1644, y
|
lda.w #$24f5 : sta $1644, y
|
||||||
+
|
+
|
||||||
ldx $00
|
ldx $00
|
||||||
+ inx #2 : cpx #$001b : bcs ++ : brl -
|
+ inx #2 : cpx #$001b : bcs ++ : JMP -
|
||||||
++
|
++
|
||||||
lda !HUD_FLAG : and.w #$0020 : bne + : brl ++ : +
|
lda !HUD_FLAG : and.w #$0020 : bne + : JMP ++ : +
|
||||||
lda HUDDungeonItems : and.w #$000c : bne + : brl ++ : +
|
lda HUDDungeonItems : and.w #$000c : bne + : JMP ++ : +
|
||||||
; map symbols (do I want these) ; note compass symbol is 2c20
|
; map symbols (do I want these) ; note compass symbol is 2c20
|
||||||
lda.w #$2821 : sta $1606 : sta $1610 : sta $161a : sta $1624
|
lda.w #$2821 : sta $1606 : sta $1610 : sta $161a : sta $1624
|
||||||
; blank out a couple thing from old hud
|
; blank out a couple thing from old hud
|
||||||
@@ -159,7 +159,7 @@ DrHudDungeonItemsAdditions:
|
|||||||
.skipBlanks iny #2
|
.skipBlanks iny #2
|
||||||
cpx #$001a : beq +
|
cpx #$001a : beq +
|
||||||
lda.w #$24f5 : sta $1644, y ; blank out spot
|
lda.w #$24f5 : sta $1644, y ; blank out spot
|
||||||
+ inx #2 : cpx #$001b : !bge ++ : brl -
|
+ inx #2 : cpx #$001b : !bge ++ : JMP -
|
||||||
++
|
++
|
||||||
plp : ply : plx : rtl
|
plp : ply : plx : rtl
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ KeyGetPlayer:
|
|||||||
LoadProperties_PreserveItemMaybe:
|
LoadProperties_PreserveItemMaybe:
|
||||||
{
|
{
|
||||||
lda.l ShuffleKeyDrops : bne +
|
lda.l ShuffleKeyDrops : bne +
|
||||||
jsl Sprite_LoadProperties : rtl
|
JML Sprite_LoadProperties
|
||||||
+ lda $0e80, x : pha
|
+ lda $0e80, x : pha
|
||||||
jsl Sprite_LoadProperties
|
jsl Sprite_LoadProperties
|
||||||
pla : sta $0e80, x
|
pla : sta $0e80, x
|
||||||
|
|||||||
@@ -399,8 +399,7 @@ StraightStairsTrapDoor:
|
|||||||
lda #$05 : sta $11
|
lda #$05 : sta $11
|
||||||
inc $0468 : stz $068e : stz $0690
|
inc $0468 : stz $068e : stz $0690
|
||||||
++ rtl
|
++ rtl
|
||||||
+ jsl Dungeon_ApproachFixedColor ; what we wrote over
|
+ JML Dungeon_ApproachFixedColor ; what we wrote over
|
||||||
rtl
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InroomStairsTrapDoor:
|
InroomStairsTrapDoor:
|
||||||
|
|||||||
@@ -64,8 +64,7 @@ FixShopCode:
|
|||||||
VitreousKeyReset:
|
VitreousKeyReset:
|
||||||
lda.l DRMode : beq +
|
lda.l DRMode : beq +
|
||||||
stz $0cba, x
|
stz $0cba, x
|
||||||
+ jsl $0db818 ;restore old code
|
+ JML $0db818 ;restore old code
|
||||||
rtl
|
|
||||||
|
|
||||||
GuruguruFix:
|
GuruguruFix:
|
||||||
lda $a0 : cmp #$df : !bge +
|
lda $a0 : cmp #$df : !bge +
|
||||||
@@ -134,7 +133,7 @@ RainPrevention:
|
|||||||
LDA.l $7EF3CC : AND #$00FF : CMP #$0001 : BEQ .done ; zelda is following
|
LDA.l $7EF3CC : AND #$00FF : CMP #$0001 : BEQ .done ; zelda is following
|
||||||
LDA $00 : CMP #$02A1 : BNE .done
|
LDA $00 : CMP #$02A1 : BNE .done
|
||||||
PLA : LDA #$0008 : RTL
|
PLA : LDA #$0008 : RTL
|
||||||
+ LDA.l BlockCastleDoorsInRain : BEQ .done ;flagged
|
+ LDA.l BlockCastleDoorsInRain : AND #$00FF : BEQ .done ;flagged
|
||||||
LDX #$FFFE
|
LDX #$FFFE
|
||||||
- INX #2 : LDA.l RemoveRainDoorsRoom, X : CMP #$FFFF : BEQ .done
|
- INX #2 : LDA.l RemoveRainDoorsRoom, X : CMP #$FFFF : BEQ .done
|
||||||
CMP $A0 : BNE -
|
CMP $A0 : BNE -
|
||||||
|
|||||||
@@ -209,12 +209,10 @@ QuadrantLoadOrderBeforeScroll:
|
|||||||
lda $045f : beq .end
|
lda $045f : beq .end
|
||||||
lda #$08 : sta $045c ; start with opposite quadrant row
|
lda #$08 : sta $045c ; start with opposite quadrant row
|
||||||
.end
|
.end
|
||||||
jsl $0091c4 ; what we overwrote
|
JML $0091c4 ; what we overwrote
|
||||||
rtl
|
|
||||||
|
|
||||||
QuadrantLoadOrderAfterScroll:
|
QuadrantLoadOrderAfterScroll:
|
||||||
lda $045f : beq .end
|
lda $045f : beq .end
|
||||||
stz $045c : stz $045f ; draw other row and clear flag
|
stz $045c : stz $045f ; draw other row and clear flag
|
||||||
.end
|
.end
|
||||||
jsl $0091c4 ; what we overwrote
|
JML $0091c4 ; what we overwrote
|
||||||
rtl
|
|
||||||
@@ -182,7 +182,7 @@ InroomStairsWarp: {
|
|||||||
sta $02
|
sta $02
|
||||||
stz $07
|
stz $07
|
||||||
lda $01 : and #$10 : lsr #4
|
lda $01 : and #$10 : lsr #4
|
||||||
brl .layer
|
JMP .layer
|
||||||
.notEdge
|
.notEdge
|
||||||
lda $01 : and #$03 : cmp #$03 : bne .normal
|
lda $01 : and #$03 : cmp #$03 : bne .normal
|
||||||
txa : and #$06 : sta $07
|
txa : and #$06 : sta $07
|
||||||
|
|||||||
Reference in New Issue
Block a user