yoshi_afraid
by hwailaluta
Game: Super Mario World
Description: As made by Kevin on SMWC
; 0 = only run away after growing from Baby Yoshi/egg ; 1 = run away whenever Mario is not riding him !always_run_away = 1 ; Speed to run away with (vanilla = $18) !run_away_speed = $18 ; SFX to play when running away ($00 = no SFX) !run_away_sfx = $13 !run_away_sfx_addr = $1DFC|!addr main: if !always_run_away == 0 lda $18E8|!addr : cmp #$01 : bne .return else lda $9D : bne .return endif lda $13D4|!addr : bne .return ldx $18E2|!addr : beq .return dex lda $C2,x : bne .return lda #$02 : sta $C2,x lda #$10 : sta $163E,x stz $1594,x stz $151C,x ldy #$00 lda $D1 : sec : sbc $E4,x lda $D2 : sbc $14E0,x bpl + iny + lda.w .run_away_speed,y : sta $B6,x if !run_away_sfx != $00 lda.b #!run_away_sfx : sta !run_away_sfx_addr endif .return: rtl .run_away_speed: db -!run_away_speed,!run_away_speedback to listings