@@ -465,9 +465,9 @@ def fix_fighters_ring(self):
465
465
Adds functionality for the fighter's ring (+2 to attack)
466
466
"""
467
467
# ring patch
468
- self .add_patch (0xf10c , 1 , ( 0x20 , 0x54 , 0xff , 0xea ) )
469
- self .add_patch (0xff64 ,1 , ( 0x85 , 0xcd , 0xa5 , 0xcf , 0x29 , 0x20 , 0xf0 , 0x07 ,
470
- 0xa5 , 0xcc , 0x18 , 0x69 , 0x02 , 0x85 , 0xcc , 0xa5 , 0xcf , 0x60 ))
468
+ self .add_patch (0xf10c , 1 , 0x20 , 0x54 , 0xff , 0xea )
469
+ self .add_patch (0xff64 ,1 , 0x85 , 0xcd , 0xa5 , 0xcf , 0x29 , 0x20 , 0xf0 , 0x07 ,
470
+ 0xa5 , 0xcc , 0x18 , 0x69 , 0x02 , 0x85 , 0xcc , 0xa5 , 0xcf , 0x60 )
471
471
472
472
def move_repel (self ):
473
473
"""
@@ -480,14 +480,14 @@ def buff_heal(self):
480
480
"""
481
481
Buffs the heal spell slightly to have a range of 10-25 instead of 10-15
482
482
"""
483
- self .add_patch (0xdbce , 1 , [ 15 ] )
483
+ self .add_patch (0xdbce , 1 , 15 )
484
484
485
485
def patch_northern_shrine (self ):
486
486
"""
487
487
Removes the 2 blocks from around the shrine guardian so you can walk around
488
488
him.
489
489
"""
490
- self .add_patch (0xd77 , 10 , [ 0x66 , 0x66 ] )
490
+ self .add_patch (0xd77 , 10 , 0x66 , 0x66 )
491
491
492
492
def revert (self ):
493
493
"""
@@ -544,15 +544,15 @@ def add_tantegel_exit(self):
544
544
Adds a quicker exit for the Tantegel throne room.
545
545
"""
546
546
# add new stairs to the throne room and 1st floor
547
- self .add_patch (0x43a , 1 , [ 0x47 ] )
548
- self .add_patch (0x2b9 , 1 , [ 0x45 ] )
547
+ self .add_patch (0x43a , 1 , 0x47 )
548
+ self .add_patch (0x2b9 , 1 , 0x45 )
549
549
# add a new exit to the first floor
550
- self .add_patch (0x2d7 , 1 , [ 0x66 ] )
550
+ self .add_patch (0x2d7 , 1 , 0x66 )
551
551
# replace the usless grave warps with some for tantegel
552
- self .add_patch (0xf45f , 1 , [ 5 , 1 , 8 ] )
553
- self .add_patch (0xf4f8 , 1 , [ 4 , 1 , 7 ] )
552
+ self .add_patch (0xf45f , 1 , 5 , 1 , 8 )
553
+ self .add_patch (0xf4f8 , 1 , 4 , 1 , 7 )
554
554
#remove the top set of stairs associated with the old warp in the grave
555
- self .add_patch (0x1298 , 1 , [ 0x22 ] )
555
+ self .add_patch (0x1298 , 1 , 0x22 )
556
556
557
557
def commit (self ):
558
558
"""
@@ -586,21 +586,20 @@ def commit(self):
586
586
self .rom_data [self .chests_slice ] = self .chests
587
587
self .apply_patches ()
588
588
589
- def add_patch (self , addr , step , data ):
589
+ def add_patch (self , addr , * data ):
590
590
"""
591
591
Adds a new manual rom patch
592
592
:Parameters:
593
593
addr : int
594
594
The address where the new data is to be applied
595
- step : int
596
- The distance between each data byte in the rom
597
595
data : array
598
- The data to be patched into the ROM
596
+ The first argument should be the distance between each byte to be placed
597
+ in the rom. The rest is the data to be patched into the ROM
599
598
600
599
rtype:
601
600
return:
602
601
"""
603
- self .patches [addr ] = ( step , * data )
602
+ self .patches [addr ] = data
604
603
605
604
def apply_patches (self ):
606
605
"""
0 commit comments