flightphases

by tjb0607

Game: SMW

Description: puts you in invalid flight phases

	LDA $100	; \ only run in gamemode 14
	EOR #$14	; |
	ORA $9D		; | and when the game isn't paused
	BEQ +		; |
	RTL		; |
	+		; /

LDA #$02  ; \ fly me to the stars
STA $19   ;  |
LDY $149F ;  |
CPY #$03  ;  |
BCS +     ;  |
STA $149F ;  |
+         ; /

LDA $1407 ; current flight phase
BNE +
RTL
+
LDA $1408 ; phase change index
CMP #$04  ; player let go of run
BNE +
LDA $1407
CMP #$03
BCC ++
LDA #$02
STA $1407  ; make flight actually end
LDA #$CE   ; and give one last cape pump before flight ends
STA $1409
++
RTL
+
LDA $14A4
CMP #$02  ; if phase change timer is 0 or 1, then
BCS +
EOR $14   ; \  randomize flight phase
ADC $15   ;  |
EOR $148D ;  |
EOR $94   ;  |
EOR $96   ; /
BNE ++    ; make sure flight phase doesn't get set to 0
LDA #$01
++
STA $1407
+
RTL
back to listings