ootw: c1: beast behaves better in rope room

keeps running when on rope

stays on ground when walking
This commit is contained in:
Vince Weaver 2019-08-19 11:31:11 -04:00
parent cd0cad8fa1
commit 55e544610e
3 changed files with 51 additions and 17 deletions

View File

@ -85,9 +85,9 @@ BEHAVIOR DIFFERENCES:
- earthquake should happen while on rope - earthquake should happen while on rope
* beast: * beast:
- beast can/should trip and fall if it gets close in the pool - beast can/should trip and fall if it gets too close but
room while running? then you pull away
- beast should climb hill in rope room better
@ -137,6 +137,7 @@ FUTURE WORK:
+ alien running + alien running
+ friend walking + friend walking
+ friend running + friend running
+ alien punching animation
* L1 pool * L1 pool
+ adjust tentacle to not go off edge of screen + adjust tentacle to not go off edge of screen

View File

@ -120,10 +120,29 @@ check_beast_right:
check_beast_left: check_beast_left:
; stop if in rope room and at edge
lda WHICH_CAVE
cmp #3
bne beast_not_rope_room
beast_rope_room:
lda BEAST_X
cmp #11
bcs beast_not_rope_room ; bge
lda #B_STANDING
sta BEAST_STATE
lda #0
sta BEAST_COUNT
rts
beast_not_rope_room:
; no attack if swinging ; no attack if swinging
lda PHYSICIST_STATE lda PHYSICIST_STATE
cmp #P_SWINGING cmp #P_SWINGING
beq stop_beast beq skip_if_swinging
; Pp^pp Bbbbbb ; Pp^pp Bbbbbb
; if B=p ; if B=p
@ -135,10 +154,7 @@ check_beast_left:
bne beast_no_stop bne beast_no_stop
beq beast_caught beq beast_caught
stop_beast: skip_if_swinging:
lda #B_STANDING
sta BEAST_STATE
rts
beast_no_stop: beast_no_stop:
inc BEAST_GAIT ; cycle through animation inc BEAST_GAIT ; cycle through animation
@ -170,6 +186,9 @@ beast_caught:
;====================== ;======================
; standing ; standing
; need to check for collision here so physicist
; doesn't just run past beast at arrival
move_beast_standing: move_beast_standing:
lda BEAST_COUNT lda BEAST_COUNT
beq beast_stand_done ; if 0, perma-stand beq beast_stand_done ; if 0, perma-stand
@ -181,6 +200,15 @@ move_beast_standing:
sta BEAST_STATE sta BEAST_STATE
beast_stand_done: beast_stand_done:
lda PHYSICIST_X
cmp BEAST_X
bne p_not_foolish
jmp beast_slash_cutscene
p_not_foolish:
rts rts
;====================================== ;======================================

View File

@ -71,6 +71,9 @@ load_swing_bg:
sta GAIT sta GAIT
sta GAME_OVER sta GAME_OVER
lda #3
sta WHICH_CAVE
jsr setup_beast jsr setup_beast
;============================ ;============================
@ -160,27 +163,29 @@ beyond_quake:
; adjust y for slope ; adjust y for slope
; shift by 2 from physicist as beast is 9 wide (vs 5)
lda BEAST_X lda BEAST_X
cmp #26 cmp #24
bcs beast_no_adjust_y ; bge bcs beast_no_adjust_y ; bge
cmp #17 cmp #15
bcc beast_on_platform bcc beast_on_platform ; blt
sec clc
sbc #3 adc #1
and #$fe ; our sprite code only draws even y and #$fe ; our sprite code only draws even y
jmp beast_done_adjust_y jmp beast_done_adjust_y
; slope is 15 - 26 ( 28 - 36) ; 16 maps to -> 16
; 26 -> 22 ; 24 maps to -> 24
beast_on_platform: beast_on_platform:
lda #14 lda #16
bne beast_done_adjust_y bne beast_done_adjust_y
beast_no_adjust_y: beast_no_adjust_y:
lda #22 lda #24
beast_done_adjust_y: beast_done_adjust_y:
sta BEAST_Y sta BEAST_Y