- ; transitions to battle view
- ; redraws the tilemap to battle view
- ; and sets up battle UI
- ; *if* the player is being touched by
- ; an enemy. All adjacent enemies to the player are
- ; moved into combat.
- ; the current map's state is preserved.
- ; transitions game state to battle
- ; switch all units to their attack state
- ; and switch draw routines to battle routines
; inputs:
- ; de: player actor
-battle_enter:
+ ; de: source actor
+ ; bc: target coordinates
+battle_attack:
call unit_find_at
ret
-
-
- ; exits battle mode
- ; and reloads the map
- ; without re-generating it.
- ; the map simply needs to be drawn again
- ; switch all units back to their active states
- ; and restore draw routines
-battle_exit:
- ret
-
-battle_update:
- ldnull bc
- ret
-
-st_update_battle:
- st_def 0x00, battle_update, st_update_battle
act_def ACT_T_DEMO_1, 0, 3, 3, 0
act_stat_def1 1, 1, 1, 1
act_stat_def2 1, 1, 32, 1
- act_st_def st_unit_demo_1_cpu_update_attack, NULL, st_unit_demo_1_cpu_update_idle, st_unit_idle
+ act_st_def st_unit_demo_1_cpu_update_idle, st_unit_idle
act_def_meta unit_draw, 0x88, OAM_FPRIO, NULL
unit_demo_warrior:
act_def ACT_T_DEMO_1, 0, 9, 9, 0
act_stat_def1 1, 1, 1, 1
act_stat_def2 1, 1, 32, 1
- act_st_def st_unit_demo_1_cpu_update_attack, NULL, st_unit_demo_1_cpu_update, st_unit_idle
+ act_st_def st_unit_demo_1_cpu_update, st_unit_idle
act_def_meta unit_draw, 0x88, OAM_FPRIO, NULL
unit_demo_mage:
act_def ACT_T_DEMO_1, 0, 9, 9, 0
act_stat_def1 1, 1, 1, 1
act_stat_def2 1, 1, 32, 1
- act_st_def st_unit_demo_1_cpu_update_attack, NULL, st_unit_demo_1_cpu_update, st_unit_idle
+ act_st_def st_unit_demo_1_cpu_update, st_unit_idle
act_def_meta unit_draw, 0x8C, OAM_FPRIO, NULL
unit_demo_thief:
act_def ACT_T_DEMO_1, 0, 9, 9, 0
act_stat_def1 1, 1, 1, 1
act_stat_def2 1, 1, 32, 1
- act_st_def st_unit_demo_1_cpu_update_attack, NULL, st_unit_demo_1_cpu_update, st_unit_idle
+ act_st_def st_unit_demo_1_cpu_update, st_unit_idle
act_def_meta unit_draw, 0x90, OAM_FPRIO, NULL
act_def ACT_T_DEMO_1, 0, 9, 9, 0
act_stat_def1 1, 1, 1, 1
act_stat_def2 1, 1, 32, 1
- act_st_def st_unit_demo_1_cpu_update_attack, NULL, st_unit_demo_1_cpu_update, st_unit_idle
+ act_st_def st_unit_demo_1_cpu_update, st_unit_idle
act_def_meta unit_draw, 0x94, OAM_FPRIO, NULL
st_unit_demo_1_cpu_update_idle:
st_def 0x00, unit_demo_1_cpu_update_idle, st_unit_demo_1_cpu_update_idle
-st_unit_demo_1_cpu_update_attack:
- st_def 0x00, unit_demo_1_cpu_update_attack, st_unit_demo_1_cpu_update_attack