Merge branch 'ChestKeyCounter' into DRMain

# Conflicts:
#	LTTP_RND_GeneralBugfixes.asm
#	build.sh
#	darkworldspawn.asm
#	events.asm
#	itemdowngrade.asm
#	shopkeeper.asm
#	stats.asm
This commit is contained in:
aerinon
2020-11-30 09:34:18 -07:00
11 changed files with 125 additions and 67 deletions

View File

@@ -30,9 +30,9 @@ JML.l NMIHookAction
org $0080D0 ; <- D0 - Bank00.asm : 164 (PHA : PHX : PHY : PHD : PHB)
NMIHookReturn:
;--------------------------------------------------------------------------------
;org $00821B ; <- 21B - Bank00.asm : 329 (LDA $13 : STA $2100)
;JML.l PostNMIHookAction : NOP
;PostNMIHookReturn:
org $00821B ; <- 21B - Bank00.asm : 329 (LDA $13 : STA $2100)
JML.l PostNMIHookAction : NOP
PostNMIHookReturn:
;--------------------------------------------------------------------------------
;================================================================================
@@ -374,6 +374,32 @@ NOP #19 ;23 bytes removed with the JSL
;--------------------------------------------------------------------------------
org $04E7AE ; <- bank0E.asm : 4230 (LDA $7EF287 : AND.w #$0020)
JSL.l TurtleRockPegSolved
org $04E7B9 ; <- bank0E.asm : 4237 (LDX $04C8)
JMP.w TurtleRockTrollPegs
TurtleRockPegCheck:
org $04E7C9
TurtleRockPegSuccess:
org $04E7F5
TurtleRockPegFail:
org $04E96F
PegProbability:
db $00 ; Probability out of 255. 0 = Vanilla behavior
TurtleRockTrollPegs:
SEP #$20
LDX.w $04C8 : CPX.w #$FFFF : BEQ .vanilla
JSL.l GetRandomInt
LDA.l PegProbability : BEQ .vanilla : CMP.l $7E0FA1
REP #$20 : !BGE .succeed
.fail
JMP.w TurtleRockPegFail
.succeed
JMP.w TurtleRockPegSuccess
.vanilla
REP #$20 : JMP.w TurtleRockPegCheck
;--------------------------------------------------------------------------------
org $1BBD05 ; <- bank1B.asm : 261 (TYA : STA $00) ; hook starts at the STA
JML.l PreventEnterOnBonk