From b514df76c399b8e143f401ae48e5076fdda93ac0 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 21 Apr 2022 15:44:52 -0600 Subject: [PATCH] Prize letters and numbers Minor bug with max keys: prevent negative values --- DoorShuffle.py | 2 +- Items.py | 18 +++++++++--------- Rom.py | 2 +- asm/hudadditions.asm | 6 +++--- data/base2current.bps | Bin 90002 -> 90014 bytes 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/DoorShuffle.py b/DoorShuffle.py index de82ca40..8dfcb726 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -1088,7 +1088,7 @@ def assign_cross_keys(dungeon_builders, world, player): # Step 2: Initial Key Number Assignment & Calculate Flexibility for name, builder in dungeon_builders.items(): calculated = int(round(builder.key_doors_num*total_keys/total_candidates)) - max_keys = builder.location_cnt - calc_used_dungeon_items(builder) + max_keys = max(0, builder.location_cnt - calc_used_dungeon_items(builder)) cand_len = max(0, len(builder.candidates) - builder.key_drop_cnt) limit = min(max_keys, cand_len) suggested = min(calculated, limit) diff --git a/Items.py b/Items.py index c88bccf7..e1b4d945 100644 --- a/Items.py +++ b/Items.py @@ -61,19 +61,19 @@ item_table = {'Bow': (True, False, None, 0x0B, 200, 'You have\nchosen the\narche 'Progressive Sword': (True, False, 'Sword', 0x5E, 150, 'a better copy\nof your sword\nfor your time', 'the unknown sword', 'sword-wielding kid', 'sword for sale', 'fungus for some slasher', 'sword boy fights again', 'a sword'), 'Progressive Glove': (True, False, None, 0x61, 150, 'a way to lift\nheavier things', 'and the lift upgrade', 'body-building kid', 'some glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'a glove'), 'Silver Arrows': (True, False, None, 0x58, 100, 'Do you fancy\nsilver tipped\narrows?', 'and the ganonsbane', 'ganon-killing kid', 'ganon doom for sale', 'fungus for pork', 'archer boy shines again', 'the silver arrows'), - 'Green Pendant': (True, False, 'Crystal', [0x04, 0x38, 0x62, 0x00, 0x69, 0x01, 0x01], 999, None, None, None, None, None, None, None), - 'Blue Pendant': (True, False, 'Crystal', [0x02, 0x34, 0x60, 0x00, 0x69, 0x02, 0x02], 999, None, None, None, None, None, None, None), - 'Red Pendant': (True, False, 'Crystal', [0x01, 0x32, 0x60, 0x00, 0x69, 0x03, 0x02], 999, None, None, None, None, None, None, None), + 'Green Pendant': (True, False, 'Crystal', [0x04, 0x38, 0x62, 0x00, 0x69, 0x01, 0x08], 999, None, None, None, None, None, None, None), + 'Blue Pendant': (True, False, 'Crystal', [0x02, 0x34, 0x60, 0x00, 0x69, 0x02, 0x09], 999, None, None, None, None, None, None, None), + 'Red Pendant': (True, False, 'Crystal', [0x01, 0x32, 0x60, 0x00, 0x69, 0x03, 0x0a], 999, None, None, None, None, None, None, None), 'Triforce': (True, False, None, 0x6A, 777, '\n YOU WIN!', 'and the triforce', 'victorious kid', 'victory for sale', 'fungus for the win', 'greedy boy wins game again', 'the Triforce'), 'Power Star': (True, False, None, 0x6B, 100, 'a small victory', 'and the power star', 'star-struck kid', 'star for sale', 'see stars with shroom', 'mario powers up again', 'a Power Star'), 'Triforce Piece': (True, False, None, 0x6C, 100, 'a small victory', 'and the thirdforce', 'triangular kid', 'triangle for sale', 'fungus for triangle', 'wise boy has triangle again', 'a Triforce Piece'), - 'Crystal 1': (True, False, 'Crystal', [0x02, 0x34, 0x64, 0x40, 0x7F, 0x06, 0x04], 999, None, None, None, None, None, None, None), - 'Crystal 2': (True, False, 'Crystal', [0x10, 0x34, 0x64, 0x40, 0x79, 0x06, 0x04], 999, None, None, None, None, None, None, None), - 'Crystal 3': (True, False, 'Crystal', [0x40, 0x34, 0x64, 0x40, 0x6C, 0x06, 0x04], 999, None, None, None, None, None, None, None), + 'Crystal 1': (True, False, 'Crystal', [0x02, 0x34, 0x64, 0x40, 0x7F, 0x06, 0x01], 999, None, None, None, None, None, None, None), + 'Crystal 2': (True, False, 'Crystal', [0x10, 0x34, 0x64, 0x40, 0x79, 0x06, 0x02], 999, None, None, None, None, None, None, None), + 'Crystal 3': (True, False, 'Crystal', [0x40, 0x34, 0x64, 0x40, 0x6C, 0x06, 0x03], 999, None, None, None, None, None, None, None), 'Crystal 4': (True, False, 'Crystal', [0x20, 0x34, 0x64, 0x40, 0x6D, 0x06, 0x04], 999, None, None, None, None, None, None, None), - 'Crystal 5': (True, False, 'Crystal', [0x04, 0x32, 0x64, 0x40, 0x6E, 0x06, 0x03], 999, None, None, None, None, None, None, None), - 'Crystal 6': (True, False, 'Crystal', [0x01, 0x32, 0x64, 0x40, 0x6F, 0x06, 0x03], 999, None, None, None, None, None, None, None), - 'Crystal 7': (True, False, 'Crystal', [0x08, 0x34, 0x64, 0x40, 0x7C, 0x06, 0x04], 999, None, None, None, None, None, None, None), + 'Crystal 5': (True, False, 'Crystal', [0x04, 0x32, 0x64, 0x40, 0x6E, 0x06, 0x05], 999, None, None, None, None, None, None, None), + 'Crystal 6': (True, False, 'Crystal', [0x01, 0x32, 0x64, 0x40, 0x6F, 0x06, 0x06], 999, None, None, None, None, None, None, None), + 'Crystal 7': (True, False, 'Crystal', [0x08, 0x34, 0x64, 0x40, 0x7C, 0x06, 0x07], 999, None, None, None, None, None, None, None), 'Single Arrow': (False, False, None, 0x43, 3, 'a lonely arrow\nsits here.', 'and the arrow', 'stick-collecting kid', 'sewing needle for sale', 'fungus for arrow', 'archer boy sews again', 'an arrow'), 'Arrows (10)': (False, False, None, 0x44, 30, 'This will give\nyou ten shots\nwith your bow!', 'and the arrow pack', 'stick-collecting kid', 'sewing kit for sale', 'fungus for arrows', 'archer boy sews again', 'ten arrows'), 'Arrow Upgrade (+10)': (False, False, None, 0x54, 100, 'increase arrow\nstorage, low\nlow price', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'arrow capacity'), diff --git a/Rom.py b/Rom.py index 81d82b62..c899f6ec 100644 --- a/Rom.py +++ b/Rom.py @@ -36,7 +36,7 @@ from source.dungeon.RoomList import Room0127 JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'd143684aa6a8e4560eb3ac912d600525' +RANDOMIZERBASEHASH = 'd2a55aa9c4fa20ad1056db532cd2c593' class JsonRom(object): diff --git a/asm/hudadditions.asm b/asm/hudadditions.asm index 14844ad9..575e189f 100644 --- a/asm/hudadditions.asm +++ b/asm/hudadditions.asm @@ -196,8 +196,8 @@ OldHudToNewHudTable: dw 1, 2, 3, 10, 4, 6, 5, 8, 11, 9, 7, 12, 13 IndicatorCharacters: - ; check G P R C - dw $2426, $2590, $2599, $259B, $258C + ; check 1 2 3 4 5 6 7 G B R + dw $2426, $2817, $2818, $2819, $281A, $281B, $281C, $281D, $2590, $258B, $259B MapIndicator: LDA.l CrystalPendantFlags_3, X : AND #$00FF @@ -223,7 +223,7 @@ ConvertToDisplay: ConvertToDisplay2: and.w #$00ff : beq ++ cmp #$000a : !blt + - !add #$2553 : rts + !add #$2553 : rts ; todo: use 2580 with 258A as "A" for non transparent digits + !add #$2816 : rts ++ lda #$2827 : rts ; 0/O for 0 or placeholder digit ;2483 diff --git a/data/base2current.bps b/data/base2current.bps index ff88366f6fca21d3890411499756befd84ad933f..617d2d584a638d611bb627b3178ca1dd0b043d09 100644 GIT binary patch delta 236 zcmVSUiC>kgmC>$sqD3B$KC7YL{1p!MDLI9+R7ARnk z$&n(d#-!SpHJASd0YCv-mp}#q6b)Mmn}xzK50!LnftOvkVFm#>3IQ~inh*g&5HEj- mk!U(=prEf4HjtYPHka!V0YL#Pw=EF?T}}vFo%}BvFdr>;!%qzW delta 238 zcmVesU00;mJ00{sG01N;P045}mC7C6gC5)G^1p!MDDgdO37ARnk$&n(d#-!Sp9hVCR z0YD-`k%H>0XPZ)9G9jL0YMNK oe~6K2I%}YyuM;+qn{+jo_YeU=0TZ`55dmFJ2