Torch+ChestKey counter bug fixed

Total Keys on keysanity menu fixed
Changed X and grayish circular symbol for new O character
Fixed a key logic error
Fixed unplaced items bug to remove red rupees
This commit is contained in:
aerinon
2020-08-18 15:21:35 -06:00
parent 49e799f658
commit 18447cfe3e
7 changed files with 16 additions and 12 deletions

View File

@@ -166,6 +166,7 @@ def vanilla_key_logic(world, player):
valid = validate_key_layout(key_layout, world, player) valid = validate_key_layout(key_layout, world, player)
if not valid: if not valid:
logging.getLogger('').warning('Vanilla key layout not valid %s', builder.name) logging.getLogger('').warning('Vanilla key layout not valid %s', builder.name)
builder.key_door_proposal = doors
if player not in world.key_logic.keys(): if player not in world.key_logic.keys():
world.key_logic[player] = {} world.key_logic[player] = {}
analyze_dungeon(key_layout, world, player) analyze_dungeon(key_layout, world, player)

View File

@@ -265,7 +265,7 @@ def generate_itempool(world, player):
if player in world.pool_adjustment.keys(): if player in world.pool_adjustment.keys():
amt = world.pool_adjustment[player] amt = world.pool_adjustment[player]
if amt < 0: if amt < 0:
for _ in range(0, amt): for _ in range(amt, 0):
pool.remove('Rupees (20)') pool.remove('Rupees (20)')
elif amt > 0: elif amt > 0:
for _ in range(0, amt): for _ in range(0, amt):

View File

@@ -24,7 +24,7 @@ from Fill import distribute_items_cutoff, distribute_items_staleness, distribute
from ItemList import generate_itempool, difficulties, fill_prizes from ItemList import generate_itempool, difficulties, fill_prizes
from Utils import output_path, parse_player_names from Utils import output_path, parse_player_names
__version__ = '0.1.0.13-u' __version__ = '0.1.0.14-u'
class EnemizerError(RuntimeError): class EnemizerError(RuntimeError):
pass pass

2
Rom.py
View File

@@ -22,7 +22,7 @@ from EntranceShuffle import door_addresses, exit_ids
JAP10HASH = '03a63945398191337e896e5771f77173' JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '01b83de5f8d3df6d17ecf0b1ed760cd9' RANDOMIZERBASEHASH = '82a102fee15ed0718257d92cd7ba031b'
class JsonRom(object): class JsonRom(object):

View File

@@ -326,8 +326,6 @@ def global_rules(world, player):
set_rule(world.get_entrance('GT Moldorm Gap', player), lambda state: state.has('Hookshot', player) and world.get_region('GT Moldorm', player).dungeon.bosses['top'].can_defeat(state)) set_rule(world.get_entrance('GT Moldorm Gap', player), lambda state: state.has('Hookshot', player) and world.get_region('GT Moldorm', player).dungeon.bosses['top'].can_defeat(state))
set_defeat_dungeon_boss_rule(world.get_location('Agahnim 2', player)) set_defeat_dungeon_boss_rule(world.get_location('Agahnim 2', player))
add_key_logic_rules(world, player)
# crystal switch rules # crystal switch rules
set_rule(world.get_entrance('PoD Arena Crystal Path', player), lambda state: state.can_reach_blue(world.get_region('PoD Arena Crystal', player), player)) set_rule(world.get_entrance('PoD Arena Crystal Path', player), lambda state: state.can_reach_blue(world.get_region('PoD Arena Crystal', player), player))
set_rule(world.get_entrance('Swamp Trench 2 Pots Blue Barrier', player), lambda state: state.can_reach_blue(world.get_region('Swamp Trench 2 Pots', player), player)) set_rule(world.get_entrance('Swamp Trench 2 Pots Blue Barrier', player), lambda state: state.can_reach_blue(world.get_region('Swamp Trench 2 Pots', player), player))
@@ -378,6 +376,8 @@ def global_rules(world, player):
set_rule(world.get_entrance('GT Double Switch Orange Path', player), lambda state: state.can_reach_orange(world.get_region('GT Double Switch Switches', player), player)) set_rule(world.get_entrance('GT Double Switch Orange Path', player), lambda state: state.can_reach_orange(world.get_region('GT Double Switch Switches', player), player))
set_rule(world.get_entrance('GT Double Switch Key Orange Path', player), lambda state: state.can_reach_orange(world.get_region('GT Double Switch Key Spot', player), player)) set_rule(world.get_entrance('GT Double Switch Key Orange Path', player), lambda state: state.can_reach_orange(world.get_region('GT Double Switch Key Spot', player), player))
add_key_logic_rules(world, player)
# End of door rando rules. # End of door rando rules.
add_rule(world.get_location('Sunken Treasure', player), lambda state: state.has('Open Floodgate', player)) add_rule(world.get_location('Sunken Treasure', player), lambda state: state.has('Open Floodgate', player))

View File

@@ -82,7 +82,10 @@ DrHudDungeonItemsAdditions:
- lda $7ef364 : and.l $0098c0, x : beq + ; must have compass - lda $7ef364 : and.l $0098c0, x : beq + ; must have compass
lda.l HudOffsets, x : tay lda.l HudOffsets, x : tay
jsr BkStatus : sta $16C6, y ; big key status jsr BkStatus : sta $16C6, y ; big key status
lda.l ChestKeys, x : jsr ConvertToDisplay2 : sta $1706, y ; small key totals phx
txa : lsr : tax
lda.l ChestKeys, x : jsr ConvertToDisplay2 : sta $1706, y ; small key totals
plx
+ inx #2 : cpx #$001b : bcc - + inx #2 : cpx #$001b : bcc -
++ ++
lda !HUD_FLAG : and.w #$0020 : bne + : bra ++ : + lda !HUD_FLAG : and.w #$0020 : bne + : bra ++ : +
@@ -105,7 +108,7 @@ DrHudDungeonItemsAdditions:
BkStatus: BkStatus:
lda $7ef366 : and.l $0098c0, x : bne +++ ; has the bk already lda $7ef366 : and.l $0098c0, x : bne +++ ; has the bk already
lda.l BigKeyStatus, x : bne ++ lda.l BigKeyStatus, x : bne ++
lda #$2574 : rts ; X for no BK lda #$2482 : rts ; 0/O for no BK
++ cmp #$0002 : bne + ++ cmp #$0002 : bne +
lda #$2420 : rts ; symbol for BnC lda #$2420 : rts ; symbol for BnC
+ lda #$24f5 : rts ; black otherwise + lda #$24f5 : rts ; black otherwise
@@ -121,7 +124,7 @@ ConvertToDisplay2:
cmp #$000a : !blt + cmp #$000a : !blt +
!add #$2553 : rts !add #$2553 : rts
+ !add #$2816 : rts + !add #$2816 : rts
++ lda #$3020 : rts ++ lda #$2483 : rts ; 0/O for 0 or placeholder digit
CountChestKeys: CountChestKeys:
jsl ItemDowngradeFix jsl ItemDowngradeFix
@@ -162,9 +165,9 @@ CountBonkItem:
lda.l BonkKey_GTower lda.l BonkKey_GTower
bra ++ bra ++
+ lda.b #$24 ; default to small key + lda.b #$24 ; default to small key
++ ++ cmp #$24 : bne +
phy : tay : jsr CountChest : ply phy : tay : jsr CountChest : ply
rtl + rtl
;================================================================================ ;================================================================================
; 16-bit A, 8-bit X ; 16-bit A, 8-bit X

File diff suppressed because one or more lines are too long