@@ -1269,7 +1269,8 @@ def chunk(l, n):
1269
1269
rom .write_int32 (0x18020C , 0 ) # starting time (in frames, sint32)
1270
1270
1271
1271
# set up goals for treasure hunt
1272
- rom .write_int16 (0x180163 , local_world .treasure_hunt_required )
1272
+ rom .write_int16 (0x180163 , max (0 , local_world .treasure_hunt_required -
1273
+ sum (1 for item in world .precollected_items [player ] if item .name == "Triforce Piece" )))
1273
1274
rom .write_bytes (0x180165 , [0x0E , 0x28 ]) # Triforce Piece Sprite
1274
1275
rom .write_byte (0x180194 , 1 ) # Must turn in triforced pieces (instant win not enabled)
1275
1276
@@ -1372,7 +1373,7 @@ def chunk(l, n):
1372
1373
'Golden Sword' , 'Tempered Sword' , 'Master Sword' , 'Fighter Sword' , 'Progressive Sword' ,
1373
1374
'Mirror Shield' , 'Red Shield' , 'Blue Shield' , 'Progressive Shield' ,
1374
1375
'Red Mail' , 'Blue Mail' , 'Progressive Mail' ,
1375
- 'Magic Upgrade (1/4)' , 'Magic Upgrade (1/2)' }:
1376
+ 'Magic Upgrade (1/4)' , 'Magic Upgrade (1/2)' , 'Triforce Piece' }:
1376
1377
continue
1377
1378
1378
1379
set_table = {'Book of Mudora' : (0x34E , 1 ), 'Hammer' : (0x34B , 1 ), 'Bug Catching Net' : (0x34D , 1 ),
@@ -2475,23 +2476,26 @@ def hint_text(dest, ped_hint=False):
2475
2476
tt ['sahasrahla_quest_have_master_sword' ] = Sahasrahla2_texts [local_random .randint (0 , len (Sahasrahla2_texts ) - 1 )]
2476
2477
tt ['blind_by_the_light' ] = Blind_texts [local_random .randint (0 , len (Blind_texts ) - 1 )]
2477
2478
2479
+ triforce_pieces_required = max (0 , w .treasure_hunt_required -
2480
+ sum (1 for item in world .precollected_items [player ] if item .name == "Triforce Piece" ))
2481
+
2478
2482
if world .goal [player ] in ['triforce_hunt' , 'local_triforce_hunt' ]:
2479
2483
tt ['ganon_fall_in_alt' ] = 'Why are you even here?\n You can\' t even hurt me! Get the Triforce Pieces.'
2480
2484
tt ['ganon_phase_3_alt' ] = 'Seriously? Go Away, I will not Die.'
2481
2485
if world .goal [player ] == 'triforce_hunt' and world .players > 1 :
2482
2486
tt ['sign_ganon' ] = 'Go find the Triforce pieces with your friends... Ganon is invincible!'
2483
2487
else :
2484
2488
tt ['sign_ganon' ] = 'Go find the Triforce pieces... Ganon is invincible!'
2485
- if w . treasure_hunt_required > 1 :
2489
+ if triforce_pieces_required > 1 :
2486
2490
tt ['murahdahla' ] = "Hello @. I\n am Murahdahla, brother of\n Sahasrahla and Aginah. Behold the power of\n " \
2487
2491
"invisibility.\n \n \n \n … … …\n \n Wait! you can see me? I knew I should have\n " \
2488
2492
"hidden in a hollow tree. If you bring\n %d Triforce pieces out of %d, I can reassemble it." % \
2489
- (w . treasure_hunt_required , w .treasure_hunt_total )
2493
+ (triforce_pieces_required , w .treasure_hunt_total )
2490
2494
else :
2491
2495
tt ['murahdahla' ] = "Hello @. I\n am Murahdahla, brother of\n Sahasrahla and Aginah. Behold the power of\n " \
2492
2496
"invisibility.\n \n \n \n … … …\n \n Wait! you can see me? I knew I should have\n " \
2493
2497
"hidden in a hollow tree. If you bring\n %d Triforce piece out of %d, I can reassemble it." % \
2494
- (w . treasure_hunt_required , w .treasure_hunt_total )
2498
+ (triforce_pieces_required , w .treasure_hunt_total )
2495
2499
elif world .goal [player ] in ['pedestal' ]:
2496
2500
tt ['ganon_fall_in_alt' ] = 'Why are you even here?\n You can\' t even hurt me! Your goal is at the pedestal.'
2497
2501
tt ['ganon_phase_3_alt' ] = 'Seriously? Go Away, I will not Die.'
@@ -2500,20 +2504,20 @@ def hint_text(dest, ped_hint=False):
2500
2504
tt ['ganon_fall_in' ] = Ganon1_texts [local_random .randint (0 , len (Ganon1_texts ) - 1 )]
2501
2505
tt ['ganon_fall_in_alt' ] = 'You cannot defeat me until you finish your goal!'
2502
2506
tt ['ganon_phase_3_alt' ] = 'Got wax in\n your ears?\n I can not die!'
2503
- if w . treasure_hunt_required > 1 :
2507
+ if triforce_pieces_required > 1 :
2504
2508
if world .goal [player ] == 'ganon_triforce_hunt' and world .players > 1 :
2505
2509
tt ['sign_ganon' ] = 'You need to find %d Triforce pieces out of %d with your friends to defeat Ganon.' % \
2506
- (w . treasure_hunt_required , w .treasure_hunt_total )
2510
+ (triforce_pieces_required , w .treasure_hunt_total )
2507
2511
elif world .goal [player ] in ['ganon_triforce_hunt' , 'local_ganon_triforce_hunt' ]:
2508
2512
tt ['sign_ganon' ] = 'You need to find %d Triforce pieces out of %d to defeat Ganon.' % \
2509
- (w . treasure_hunt_required , w .treasure_hunt_total )
2513
+ (triforce_pieces_required , w .treasure_hunt_total )
2510
2514
else :
2511
2515
if world .goal [player ] == 'ganon_triforce_hunt' and world .players > 1 :
2512
2516
tt ['sign_ganon' ] = 'You need to find %d Triforce piece out of %d with your friends to defeat Ganon.' % \
2513
- (w . treasure_hunt_required , w .treasure_hunt_total )
2517
+ (triforce_pieces_required , w .treasure_hunt_total )
2514
2518
elif world .goal [player ] in ['ganon_triforce_hunt' , 'local_ganon_triforce_hunt' ]:
2515
2519
tt ['sign_ganon' ] = 'You need to find %d Triforce piece out of %d to defeat Ganon.' % \
2516
- (w . treasure_hunt_required , w .treasure_hunt_total )
2520
+ (triforce_pieces_required , w .treasure_hunt_total )
2517
2521
2518
2522
tt ['kakariko_tavern_fisherman' ] = TavernMan_texts [local_random .randint (0 , len (TavernMan_texts ) - 1 )]
2519
2523
0 commit comments