let's dev 2/27/18

updates to floodgate softlock protection
nerfed byrna invulnerability for hard modes
add uncle refill switches for standard+random swords
This commit is contained in:
Karkat
2018-02-27 00:22:59 -05:00
parent c5aacf61db
commit e0b55d6e8f
6 changed files with 63 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
db #$00 ; expand file to 2mb db #$00 ; expand file to 2mb
org $1FFFF8 ; <- FFFF8 timestamp rom org $1FFFF8 ; <- FFFF8 timestamp rom
db #$20, #$18, #$02, #$23 ; year/month/day db #$20, #$18, #$02, #$27 ; year/month/day
;================================================================================ ;================================================================================

View File

@@ -23,15 +23,21 @@ OnDungeonExit:
PHA : PHP PHA : PHP
JSL.l HUD_RebuildLong JSL.l HUD_RebuildLong
JSL.l FloodGateResetInner
PLP : PLA PLP : PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnUncleItemGet: OnUncleItemGet:
JSL Link_ReceiveItem JSL Link_ReceiveItem
LDA.l EscapeAssist LDA.l EscapeAssist
BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : + BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : +
BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : + BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : +
AND.b #$01 : STA !INFINITE_ARROWS BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : +
LDA.l UncleRefill : BIT.b #$04 : BEQ + : LDA.b #$80 : STA $7EF373 : + ; refill magic
LDA.l UncleRefill : BIT.b #$02 : BEQ + : LDA.b #50 : STA $7EF375 : + ; refill bombs
LDA.l UncleRefill : BIT.b #$01 : BEQ + : LDA.b #70 : STA $7EF376 : + ; refill arrows
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnAga2Defeated: OnAga2Defeated:
@@ -53,6 +59,20 @@ OnFileLoad:
LDA.l GenericKeys : BEQ + LDA.l GenericKeys : BEQ +
LDA $7EF38B : STA $7EF36F ; copy generic keys to key counter LDA $7EF38B : STA $7EF36F ; copy generic keys to key counter
+ +
STA $FFFFFF
LDA $7EF3C5 : CMP.b #$01 : BNE .notrain ; check if we're in rain state
.rain
LDA.l EscapeAssist
BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : +
BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : +
BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : +
BRA ++
.notrain
LDA.l EscapeAssist : BIT.b #$04 : BEQ + : LDA.b #$00 : STA !INFINITE_MAGIC : +
LDA.l EscapeAssist : BIT.b #$02 : BEQ + : LDA.b #$00 : STA !INFINITE_BOMBS : +
LDA.l EscapeAssist : BIT.b #$01 : BEQ + : LDA.b #$00 : STA !INFINITE_ARROWS : +
++
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090" !RNG_ITEM_LOCK_IN = "$7F5090"

View File

@@ -4,15 +4,16 @@
FloodGateAndMasterSwordFollowerReset: FloodGateAndMasterSwordFollowerReset:
JSL.l MasterSwordFollowerClear JSL.l MasterSwordFollowerClear
FloodGateReset: FloodGateReset:
LDA.l Bugfix_SwampWaterLevel : BEQ +
LDA $7EF06E : AND.b #$7F : STA $7EF06E ; clear water room 55
LDA $7EF06A : AND.b #$7F : STA $7EF06A ; clear water room 53
+
LDA.l PersistentFloodgate : BNE + LDA.l PersistentFloodgate : BNE +
LDA $7EF2BB : AND.b #$DF : STA $7EF2BB ; reset water outside floodgate LDA $7EF2BB : AND.b #$DF : STA $7EF2BB ; reset water outside floodgate
LDA $7EF2FB : AND.b #$DF : STA $7EF2FB ; reset water outside swamp palace LDA $7EF2FB : AND.b #$DF : STA $7EF2FB ; reset water outside swamp palace
LDA $7EF216 : AND.b #$7F : STA $7EF216 ; clear water inside floodgate LDA $7EF216 : AND.b #$7F : STA $7EF216 ; clear water inside floodgate
LDA $7EF051 : AND.b #$FE : STA $7EF051 ; clear water room 40 LDA $7EF051 : AND.b #$FE : STA $7EF051 ; clear water front room (room 40)
+
FloodGateResetInner:
LDA.l Bugfix_SwampWaterLevel : BEQ +
; LDA $7EF06E : AND.b #$7F : STA $7EF06E ; clear water room 55 - outer room you shouldn't be able to softlock except in major glitches
LDA $7EF06A : AND.b #$7F : STA $7EF06A ; clear water room 53 - inner room with the easy key flood softlock
+ +
RTL RTL
;================================================================================ ;================================================================================

View File

@@ -54,3 +54,21 @@ CalculateCapeUsage:
LDA $7EF36E ; thing we wrote over LDA $7EF36E ; thing we wrote over
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
ActivateInvulnerabilityOrDont:
LDA $1B : BEQ .nowhere_special
REP #$20 ; set 16-bit accumulator
LDA $A0 ; these are all decimal because i got them that way
CMP.w #95 : BEQ .somewhere_cool ; Ice Palace Spike Room
CMP.w #179 : BEQ .somewhere_cool ; Room in Misery Mire
CMP.w #213 : BEQ .somewhere_cool ; Laser Bridge
CMP.w #279 : BEQ .somewhere_cool ; Spike Cave
SEP #$20 ; set 8-bit accumulator
BRA .nowhere_special
.somewhere_cool
SEP #$20 ; set 8-bit accumulator
LDA.b #$01 : STA $037B : RTL
.nowhere_special
LDA.l ByrnaInvulnerability : STA $037B
RTL
;--------------------------------------------------------------------------------

View File

@@ -277,6 +277,9 @@ JSL.l CalculateCapeUsage
org $07AE98 ; <- 3AE98 - Bank07.asm : 7380 (LDA $7EF36E) org $07AE98 ; <- 3AE98 - Bank07.asm : 7380 (LDA $7EF36E)
JSL.l CalculateCapeUsage JSL.l CalculateCapeUsage
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $08DCA7 ; <- 45CA7 - ancilla_cane_spark.asm : 256 (LDA.b #$01 : STA $037B)
JSL.l ActivateInvulnerabilityOrDont : NOP
;--------------------------------------------------------------------------------
;================================================================================ ;================================================================================
; Misc Stats ; Misc Stats

View File

@@ -206,13 +206,25 @@ SmithTravelsFreely:
db #$00 ; #$00 = Off (default) - #$01 = On (frog/smith can enter multi-entrance doors) db #$00 ; #$00 = Off (default) - #$01 = On (frog/smith can enter multi-entrance doors)
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $30804D ; PC 0x18004D org $30804D ; PC 0x18004D
EscapeAssist: EscapeAssist: ; ScrubMode:
db #$00 db #$00
;---- -mba ;---- -mba
;m - Infinite Magic ;m - Infinite Magic
;b - Infinite Bombs ;b - Infinite Bombs
;a - Infinite Arrows ;a - Infinite Arrows
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $30804E ; PC 0x18004E
UncleRefill:
db #$00
;---- -mba
;m - Refill Magic
;b - Refill Bombs
;a - Refill Arrows
;--------------------------------------------------------------------------------
org $30804F ; PC 0x18004F
ByrnaInvulnerability:
db #$00 ; #$00 = Off - #$01 = On (default)
;--------------------------------------------------------------------------------
org $308080 ; PC 0x180080 org $308080 ; PC 0x180080
Upgrade5BombsRefill: Upgrade5BombsRefill:
db #$00 db #$00